diff mbox series

[6/9] pynfs: add makefile target to show test results

Message ID 20250303130948.630029-7-smayhew@redhat.com (mailing list archive)
State New
Headers show
Series tweak results organization and reporting | expand

Commit Message

Scott Mayhew March 3, 2025, 1:09 p.m. UTC
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 <smayhew@redhat.com>
---
 workflows/pynfs/Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/workflows/pynfs/Makefile b/workflows/pynfs/Makefile
index 75a4b6a..253a222 100644
--- a/workflows/pynfs/Makefile
+++ b/workflows/pynfs/Makefile
@@ -24,6 +24,10 @@  PYNFS_KERNEL_CI_LOOP      := scripts/workflows/pynfs/run_kernel_ci.sh
 PYNFS_KERNEL_CI_LOOP_KOTD := scripts/workflows/pynfs/run_kernel_ci_kotd.sh
 endif # CONFIG_KERNEL_CI
 
+ifndef LAST_KERNEL
+LAST_KERNEL := $(shell cat workflows/pynfs/results/last-kernel.txt 2>/dev/null)
+endif
+
 # Makefile for pynfs targets
 pynfs:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
@@ -63,6 +67,14 @@  pynfs-dev-reset:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
 		-f 30 -i hosts -l dev playbooks/pynfs.yml --tags vars,reset --extra-vars=@./extra_vars.yaml
 
+pynfs-show-results:
+ifdef LAST_KERNEL
+	@find workflows/pynfs/results/$(LAST_KERNEL) -type f \
+		| xargs -I {} bash -c 'echo "{}:"; cat {}; echo -e "\n";'
+else
+	@echo "No results."
+endif
+
 pynfs-help-menu:
 	@echo "pynfs options:"
 	@echo "pynfs                             - Git clone pynfs, build and install it"