Skip to content

Commit df3e793

Browse files
committed
pynfs: add makefile target to show test results
Add 'pynfs-show-results' makefile target to show test results. Under the hood, it more or less just does 'find ... | xargs cat'. It shows the json results files for the most recent kernel run. You can show the results for a differnt kernel by overriding the LAST_KERNEL variable, e.g. $ LAST_KERNEL=6.13.4-300.fc41.x86_64 make pynfs-show-results Signed-off-by: Scott Mayhew <[email protected]>
1 parent 494cbfb commit df3e793

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

workflows/pynfs/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,24 @@ PYNFS_KERNEL_CI_LOOP := scripts/workflows/pynfs/run_kernel_ci.sh
2424
PYNFS_KERNEL_CI_LOOP_KOTD := scripts/workflows/pynfs/run_kernel_ci_kotd.sh
2525
endif # CONFIG_KERNEL_CI
2626

27+
ifndef LAST_KERNEL
28+
LAST_KERNEL := $(shell cat workflows/pynfs/results/last-kernel.txt 2>/dev/null)
29+
endif
30+
31+
ifeq ($(LAST_KERNEL), $(shell cat workflows/pynfs/results/last-kernel.txt 2>/dev/null))
32+
FIND_PATH := workflows/pynfs/results/last-run
33+
else
34+
FIND_PATH := workflows/pynfs/results/$(LAST_KERNEL)
35+
endif
36+
37+
ifndef PATTERN
38+
PATTERN := -name "*.json"
39+
endif
40+
41+
ifndef XARGS_ARGS
42+
XARGS_ARGS := -I {} bash -c 'echo "{}:"; cat {}; echo;'
43+
endif
44+
2745
# Makefile for pynfs targets
2846
pynfs:
2947
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
@@ -63,6 +81,11 @@ pynfs-dev-reset:
6381
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
6482
-f 30 -i hosts -l dev playbooks/pynfs.yml --tags vars,reset --extra-vars=@./extra_vars.yaml
6583

84+
pynfs-show-results:
85+
@find $(FIND_PATH) -type f $(PATTERN) \
86+
| xargs $(XARGS_ARGS) \
87+
| sed '$${/^$$/d;}'
88+
6689
pynfs-help-menu:
6790
@echo "pynfs options:"
6891
@echo "pynfs - Git clone pynfs, build and install it"

0 commit comments

Comments
 (0)