Skip to content

Commit d17a909

Browse files
committed
gitr: add makefile target to show test results
Under the hood, it more or less just does 'find ... | xargs cat'. By default, the summary files will be shown for the most recent kernel run. You can show the results for a different kernel by overriding the LAST_KERNEL variable, e.g. $ LAST_KERNEL=6.13.4-100.fc40.x86_64 make gitr-show-results You can change the files being shown by overriding the PATTERN variable. For example, to just see the rpc and xprt statisics: $ PATTERN="\( -name \"*.rpc\" -o -name \"*.xprt\" \)" make gitr-show-results Note that since the gitr log files have a date and timestamp in the filename, it's possible to accumulate logs from multiple test runs. If you're showing the results from the most recent kernel, then we'll only show the logs from the most recent run (i.e. logs that are in the last-run directory). But if you're showing the results from an older kernel, then we'll show all the logs in that directory (but you can override that too if you get creative with the PATTERN variable). Signed-off-by: Scott Mayhew <[email protected]>
1 parent e48e405 commit d17a909

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

workflows/gitr/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,24 @@ GITR_KERNEL_CI_LOOP := scripts/workflows/gitr/run_kernel_ci.sh
7070
GITR_KERNEL_CI_LOOP_KOTD := scripts/workflows/gitr/run_kernel_ci_kotd.sh
7171
endif # CONFIG_KERNEL_CI
7272

73+
ifndef LAST_KERNEL
74+
LAST_KERNEL := $(shell cat workflows/gitr/results/last-kernel.txt 2>/dev/null)
75+
endif
76+
77+
ifeq ($(LAST_KERNEL), $(shell cat workflows/gitr/results/last-kernel.txt 2>/dev/null))
78+
FIND_PATH := workflows/gitr/results/last-run
79+
else
80+
FIND_PATH := workflows/gitr/results/$(LAST_KERNEL)
81+
endif
82+
83+
ifndef PATTERN
84+
PATTERN := -name "*.summary"
85+
endif
86+
87+
ifndef XARGS_ARGS
88+
XARGS_ARGS := -I {} bash -c 'echo "{}:"; cat {}; echo;'
89+
endif
90+
7391
gitr:
7492
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
7593
-f 30 -i hosts playbooks/gitr.yml \
@@ -103,6 +121,11 @@ gitr-dev-reset:
103121
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
104122
-f 30 -i hosts -l dev playbooks/gitr.yml --tags vars,reset --extra-vars=@./extra_vars.yaml
105123

124+
gitr-show-results:
125+
@find $(FIND_PATH) -type f $(PATTERN) \
126+
| xargs $(XARGS_ARGS) \
127+
| sed '$${/^$$/d;}'
128+
106129
gitr-help-menu:
107130
@echo "gitr options:"
108131
@echo "gitr - Git clone git, build and install it"

0 commit comments

Comments
 (0)