From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 143D8385043B for ; Wed, 18 Aug 2021 19:26:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 143D8385043B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-586-YrMhgsqYOWK27h0Bf5whPA-1; Wed, 18 Aug 2021 15:26:46 -0400 X-MC-Unique: YrMhgsqYOWK27h0Bf5whPA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E2F3801AEB for ; Wed, 18 Aug 2021 19:26:45 +0000 (UTC) Received: from guittard.uglyboxes.com (ovpn-115-36.phx2.redhat.com [10.3.115.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id F0DD4190EB for ; Wed, 18 Aug 2021 19:26:44 +0000 (UTC) From: Keith Seitz To: bunsen@sourceware.org Subject: [PATCH 2/4] Add verbose option to +summarize Date: Wed, 18 Aug 2021 12:26:37 -0700 Message-Id: <20210818192639.2362335-3-keiths@redhat.com> In-Reply-To: <20210818192639.2362335-1-keiths@redhat.com> References: <20210818192639.2362335-1-keiths@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: bunsen@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bunsen mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 19:26:58 -0000 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 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 [tests]" +info = "summarize.py [tests=tests] [verbose=True/False]" cmdline_args = [ ('commit', None, '', "commit to fetch results for"), ('tests', None, '', - "comma-separated list of glob expressions of tests to summarize") + "comma-separated list of glob expressions of tests to summarize"), + ('verbose', False, '', + '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