public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Scott Mayhew <smayhew@redhat.com>
To: kdevops@lists.linux.dev
Subject: [PATCH 8/9] gitr: add makefile target to show test results
Date: Mon,  3 Mar 2025 08:09:47 -0500	[thread overview]
Message-ID: <20250303130948.630029-9-smayhew@redhat.com> (raw)
In-Reply-To: <20250303130948.630029-1-smayhew@redhat.com>

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 newer than
the timestamp of 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 <smayhew@redhat.com>
---
 workflows/gitr/Makefile | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/workflows/gitr/Makefile b/workflows/gitr/Makefile
index 5432f42..8d64767 100644
--- a/workflows/gitr/Makefile
+++ b/workflows/gitr/Makefile
@@ -70,6 +70,14 @@ GITR_KERNEL_CI_LOOP      := scripts/workflows/gitr/run_kernel_ci.sh
 GITR_KERNEL_CI_LOOP_KOTD := scripts/workflows/gitr/run_kernel_ci_kotd.sh
 endif # CONFIG_KERNEL_CI
 
+ifndef LAST_KERNEL
+LAST_KERNEL := $(shell cat workflows/gitr/results/last-kernel.txt 2>/dev/null)
+endif
+
+ifndef PATTERN
+PATTERN := -name "*.summary"
+endif
+
 gitr:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
 		-f 30 -i hosts playbooks/gitr.yml \
@@ -103,6 +111,19 @@ gitr-dev-reset:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
 		-f 30 -i hosts -l dev playbooks/gitr.yml --tags vars,reset --extra-vars=@./extra_vars.yaml
 
+gitr-show-results:
+ifdef LAST_KERNEL
+ifeq ($(LAST_KERNEL), $(shell cat workflows/gitr/results/last-kernel.txt 2>/dev/null))
+	@find workflows/gitr/results/$(LAST_KERNEL) -type f $(PATTERN) -newer workflows/gitr/results/last-run \
+		| xargs -I {} bash -c 'echo "{}:"; cat {}; echo;'
+else
+	@find workflows/gitr/results/$(LAST_KERNEL) -type f $(PATTERN) \
+		| xargs -I {} bash -c 'echo "{}:"; cat {}; echo;'
+endif
+else
+	@echo "No results."
+endif
+
 gitr-help-menu:
 	@echo "gitr options:"
 	@echo "gitr                              - Git clone git, build and install it"
-- 
2.48.1


  parent reply	other threads:[~2025-03-03 13:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-03 13:09 [PATCH 0/9] tweak results organization and reporting Scott Mayhew
2025-03-03 13:09 ` [PATCH 1/9] pynfs: add last-run directory and last-kernel.txt to the results Scott Mayhew
2025-03-03 13:09 ` [PATCH 2/9] nfstest: " Scott Mayhew
2025-03-03 13:09 ` [PATCH 3/9] gitr: " Scott Mayhew
2025-03-03 13:09 ` [PATCH 4/9] ltp: " Scott Mayhew
2025-03-03 13:09 ` [PATCH 5/9] fstests: add makefile target to show test results Scott Mayhew
2025-03-06 16:48   ` Luis Chamberlain
2025-03-03 13:09 ` [PATCH 6/9] pynfs: " Scott Mayhew
2025-03-03 13:09 ` [PATCH 7/9] nfstest: " Scott Mayhew
2025-03-03 13:09 ` Scott Mayhew [this message]
2025-03-03 13:09 ` [PATCH 9/9] ltp: " Scott Mayhew
2025-03-12 20:09 ` [PATCH 0/9] tweak results organization and reporting Chuck Lever
2025-03-12 22:58   ` Luis Chamberlain
  -- strict thread matches above, loose matches on Subject: below --
2025-03-05  0:57 Scott Mayhew
2025-03-05  0:57 ` [PATCH 8/9] gitr: add makefile target to show test results Scott Mayhew

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250303130948.630029-9-smayhew@redhat.com \
    --to=smayhew@redhat.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox