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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id B3614385841F for ; Fri, 1 Oct 2021 21:00:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3614385841F 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-261-2EovodKJMQ2HwDcNBpCgqg-1; Fri, 01 Oct 2021 17:00:23 -0400 X-MC-Unique: 2EovodKJMQ2HwDcNBpCgqg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10BB7102CB76 for ; Fri, 1 Oct 2021 21:00:23 +0000 (UTC) Received: from blarsen.com (ovpn-116-80.gru2.redhat.com [10.97.116.80]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79D395F4F5; Fri, 1 Oct 2021 21:00:06 +0000 (UTC) From: Bruno Larsen To: gdb-patches@sourceware.org Subject: [PATCH v4] [gdb/testsuite] update analyze-racy-logs.py to python3 Date: Fri, 1 Oct 2021 17:59:47 -0300 Message-Id: <20211001205947.38253-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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, KAM_NUMSUBJECT, 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2021 21:00:32 -0000 Since python 2 is no longer supported on most distributions, update the script to run under python while while still being runnable under python2. --- gdb/testsuite/analyze-racy-logs.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/analyze-racy-logs.py b/gdb/testsuite/analyze-racy-logs.py index 604a272831c..4724e1bdbfc 100755 --- a/gdb/testsuite/analyze-racy-logs.py +++ b/gdb/testsuite/analyze-racy-logs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2016-2021 Free Software Foundation, Inc. # @@ -145,7 +145,7 @@ def identify_racy_tests(): # to be ignored. For example, tests both in the PASS and KFAIL # states should not be considered racy. ignored_tests = set() - for s1, s2 in ignore_relations.iteritems(): + for s1, s2 in ignore_relations.items(): try: ignored_tests |= all_tests[s1] & all_tests[s2] except: @@ -159,16 +159,16 @@ def identify_racy_tests(): racy_tests = racy_tests - ignored_tests # Print the header. - print "\t\t=== gdb racy tests ===\n" + print("\t\t=== gdb racy tests ===\n") # Print each test. for line in sorted(racy_tests): - print line + print(line) # Print the summary. - print "\n" - print "\t\t=== gdb Summary ===\n" - print "# of racy tests:\t\t%d" % len(racy_tests) + print("\n") + print("\t\t=== gdb Summary ===\n") + print("# of racy tests:\t\t%d" % len(racy_tests)) if __name__ == "__main__": -- 2.27.0