diff options
author | Gabe Black <gabeblack@google.com> | 2018-03-05 22:05:47 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-03-06 23:39:01 +0000 |
commit | 0bb50e6745b35c785c4d8051eb43f6bc419fb924 (patch) | |
tree | 97dfd086d6e4b3f4252aec459091ff6dad19f2b6 /tests | |
parent | 10e5646dbbe46aa317ec568cb2a58968ca867575 (diff) | |
download | gem5-0bb50e6745b35c785c4d8051eb43f6bc419fb924.tar.xz |
scons: Switch from the print statement to the print function.
Starting with version 3, scons imposes using the print function instead
of the print statement in code it processes. To get things building
again, this change moves all python code within gem5 to use the
function version. Another change by another author separately made this
same change to the site_tools and site_init.py files.
Change-Id: I2de7dc3b1be756baad6f60574c47c8b7e80ea3b0
Reviewed-on: https://gem5-review.googlesource.com/8761
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SConscript | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/SConscript b/tests/SConscript index 3ed3e248b..b47315fd6 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -42,6 +42,8 @@ # Kevin Lim # Andreas Sandberg +from __future__ import print_function + from SCons.Script.SConscript import SConsEnvironment import os import pickle @@ -136,7 +138,7 @@ def print_test(target, source, env): if formatter: formatter.dump_suites([result]) - print "***** %s: %s" % (source[0].dir, status) + print("***** %s: %s" % (source[0].dir, status)) return 0 printAction = env.Action(print_test, strfunction=None) @@ -163,19 +165,19 @@ def update_test(target, source, env): result = result[0] if result.skipped(): - print "*** %s: %s: Test skipped, not updating." % ( - source[0].dir, color_message(termcap.Yellow, "WARNING"), ) + print("*** %s: %s: Test skipped, not updating." % + (source[0].dir, color_message(termcap.Yellow, "WARNING"))) return 0 elif result: - print "*** %s: %s: Test successful, not updating." % ( - source[0].dir, color_message(termcap.Green, "skipped"), ) + print("*** %s: %s: Test successful, not updating." % + (source[0].dir, color_message(termcap.Green, "skipped"))) return 0 elif result.failed_run(): - print "*** %s: %s: Test failed, not updating." % ( - source[0].dir, color_message(termcap.Red, "ERROR"), ) + print("*** %s: %s: Test failed, not updating." % + (source[0].dir, color_message(termcap.Red, "ERROR"))) return 1 - print "** Updating %s" % (test, ) + print("** Updating %s" % test) test.update_ref() return 0 @@ -236,7 +238,7 @@ def list_tests(target, source, env): with open(target[0].abspath, "w") as fout: for cat in categories: for test in env.Tests[cat]: - print >> fout,"/".join(test) + print("/".join(test), file=fout) return 0 |