From: Bruno Larsen <blarsen@redhat.com>
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 [thread overview]
Message-ID: <20211001205947.38253-1-blarsen@redhat.com> (raw)
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
next reply other threads:[~2021-10-01 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 20:59 Bruno Larsen [this message]
2021-10-02 1:32 ` Simon Marchi
2021-10-04 12:58 ` Bruno Larsen
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=20211001205947.38253-1-blarsen@redhat.com \
--to=blarsen@redhat.com \
--cc=gdb-patches@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).