[gdb/testsuite] update analyze-racy-logs.py to python3
Since python 2 is no longer supported on most distributions, update the script to run under python while while still being runnable under python2.
This commit is contained in:
parent
86c1ed137a
commit
6619a08b25
1 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright (C) 2016-2021 Free Software Foundation, Inc.
|
# 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
|
# to be ignored. For example, tests both in the PASS and KFAIL
|
||||||
# states should not be considered racy.
|
# states should not be considered racy.
|
||||||
ignored_tests = set()
|
ignored_tests = set()
|
||||||
for s1, s2 in ignore_relations.iteritems():
|
for s1, s2 in ignore_relations.items():
|
||||||
try:
|
try:
|
||||||
ignored_tests |= all_tests[s1] & all_tests[s2]
|
ignored_tests |= all_tests[s1] & all_tests[s2]
|
||||||
except:
|
except:
|
||||||
|
@ -159,16 +159,16 @@ def identify_racy_tests():
|
||||||
racy_tests = racy_tests - ignored_tests
|
racy_tests = racy_tests - ignored_tests
|
||||||
|
|
||||||
# Print the header.
|
# Print the header.
|
||||||
print "\t\t=== gdb racy tests ===\n"
|
print("\t\t=== gdb racy tests ===\n")
|
||||||
|
|
||||||
# Print each test.
|
# Print each test.
|
||||||
for line in sorted(racy_tests):
|
for line in sorted(racy_tests):
|
||||||
print line
|
print(line)
|
||||||
|
|
||||||
# Print the summary.
|
# Print the summary.
|
||||||
print "\n"
|
print("\n")
|
||||||
print "\t\t=== gdb Summary ===\n"
|
print("\t\t=== gdb Summary ===\n")
|
||||||
print "# of racy tests:\t\t%d" % len(racy_tests)
|
print("# of racy tests:\t\t%d" % len(racy_tests))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue