From: Keith Seitz <keiths@redhat.com>
To: bunsen@sourceware.org
Subject: [PATCH 2/4] Add verbose option to +summarize
Date: Wed, 18 Aug 2021 12:26:37 -0700 [thread overview]
Message-ID: <20210818192639.2362335-3-keiths@redhat.com> (raw)
In-Reply-To: <20210818192639.2362335-1-keiths@redhat.com>
This patch adds a new option to the +summarize subcommand that
can be used to output all the recorded (sub)test results of
the listed test files.
This permits even finer-grained examination of testing. I largely
use this to validate bunsen imports.
Example:
$ ./bunsen.py +summarize 55ba676659868b0d8359785b876942473a516649 \
verbose=True tests=gdb.dwarf2/mac-fileno.exp
Using branch index, checkout name wd-summarize
Running summarize at .../bunsen/.bunsen/wd-summarize from .../bunsen/scripts-main/summarize.py with ['55ba676659868b0d8359785b876942473a516649', 'verbose=True', 'tests=gdb.dwarf2/mac-fileno.exp']
===
Summary for commit 55ba676659868b0d8359785b876942473a516649 of gdb version 10.0.50.20200826-git
from branch master on x86_64 using <unknown board>
limiting results to tests matching: gdb.dwarf2/mac-fileno.exp
PASS: gdb.dwarf2/mac-fileno.exp: list func_cu1
PASS: gdb.dwarf2/mac-fileno.exp: ptype func_cu1
PASS: gdb.dwarf2/mac-fileno.exp: set listsize 1
=== gdb Summary ===
# of expected passes 3
---
scripts-main/summarize.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/scripts-main/summarize.py b/scripts-main/summarize.py
index 279377b..1e30135 100755
--- a/scripts-main/summarize.py
+++ b/scripts-main/summarize.py
@@ -4,12 +4,14 @@
# of the desired test run. Optionally also takes a comma-separated
# list of glob expressions to limit results.
-info = "summarize.py <bunsen_commit> [tests]"
+info = "summarize.py <bunsen_commit> [tests=tests] [verbose=True/False]"
cmdline_args = [
('commit', None, '<bunsen_commit>',
"commit to fetch results for"),
('tests', None, '<test_globs>',
- "comma-separated list of glob expressions of tests to summarize")
+ "comma-separated list of glob expressions of tests to summarize"),
+ ('verbose', False, '<verbose>',
+ 'output verbose test results')
]
import sys
@@ -59,6 +61,13 @@ if __name__ == '__main__':
# Collate results for outcomes
c = Counter(t['outcome'] for t in found_tests)
+ if opts.verbose:
+ for t in found_tests:
+ print(f'{t.outcome}: {t.name}: {t.subtest}')
+ print()
+ print(f'\t\t=== {project} Summary ===')
+ print()
+
# We could simply loop over the keys of the Counter, but that would not necessarily give
# us the same output order as DejaGNU itself.
for l in outcome_labels:
--
2.31.1
next prev parent reply other threads:[~2021-08-18 19:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 19:26 Fix GDB data imports Keith Seitz
2021-08-18 19:26 ` [PATCH 1/4] Rewrite gdb.parse_dejagnu_sum Keith Seitz
2021-08-19 12:40 ` Serhei Makarov
2021-08-19 15:33 ` Keith Seitz
2021-08-18 19:26 ` Keith Seitz [this message]
2021-08-18 19:26 ` [PATCH 3/4] Add new outcomes to summarize script Keith Seitz
2021-08-18 19:26 ` [PATCH 4/4] Add support for reading the target_board Keith Seitz
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=20210818192639.2362335-3-keiths@redhat.com \
--to=keiths@redhat.com \
--cc=bunsen@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).