From: Scott Mayhew <smayhew@redhat.com>
To: kdevops@lists.linux.dev
Subject: [PATCH 9/9] ltp: add makefile target to show test results
Date: Mon, 3 Mar 2025 08:09:48 -0500 [thread overview]
Message-ID: <20250303130948.630029-10-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 "*.failed" 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.11.9-100.fc39.x86_64 make ltp-show-results
You can change the files being shown by overriding the PATTERN variable.
For example, to just see the full test logs:
$ PATTERN="-name \"*.log\"" make ltp-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/ltp/Makefile | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/workflows/ltp/Makefile b/workflows/ltp/Makefile
index 4e439da..8de76a0 100644
--- a/workflows/ltp/Makefile
+++ b/workflows/ltp/Makefile
@@ -96,6 +96,14 @@ LTP_KERNEL_CI_LOOP := scripts/workflows/ltp/run_kernel_ci.sh
LTP_KERNEL_CI_LOOP_KOTD := scripts/workflows/ltp/run_kernel_ci_kotd.sh
endif # CONFIG_KERNEL_CI
+ifndef LAST_KERNEL
+LAST_KERNEL := $(shell cat workflows/ltp/results/last-kernel.txt 2>/dev/null)
+endif
+
+ifndef PATTERN
+PATTERN := -name "*.failed"
+endif
+
ltp:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
-f 30 -i hosts playbooks/ltp.yml --skip-tags run_tests,copy_results
@@ -128,6 +136,19 @@ ltp-dev-reset:
-f 30 -i hosts -l dev playbooks/ltp.yml \
--tags vars,reset --extra-vars=@./extra_vars.yaml
+ltp-show-results:
+ifdef LAST_KERNEL
+ifeq ($(LAST_KERNEL), $(shell cat workflows/ltp/results/last-kernel.txt 2>/dev/null))
+ find workflows/ltp/results/$(LAST_KERNEL) -type f $(PATTERN) -newer workflows/ltp/results/last-run \
+ | xargs -I {} bash -c 'echo "{}:"; cat {}; echo;'
+else
+ @find workflows/ltp/results/$(LAST_KERNEL) -type f $(PATTERN) \
+ | xargs -I {} bash -c 'echo "{}:"; cat {}; echo;'
+endif
+else
+ @echo "No results."
+endif
+
ltp-help-menu:
@echo "ltp options:"
@echo "ltp - Git clone ltp, build and install it"
--
2.48.1
next prev 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 ` [PATCH 8/9] gitr: " Scott Mayhew
2025-03-03 13:09 ` Scott Mayhew [this message]
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 9/9] ltp: 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-10-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