summaryrefslogtreecommitdiff
path: root/tests/configs/switcheroo.py
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2018-03-09 11:47:25 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2018-03-09 22:45:20 +0000
commitb3d0f2d66a5bf79f66893adcb85b0ac78daf3f65 (patch)
treeb69b4472d7a21b9bdb8a5d43f197d03c850fd7e0 /tests/configs/switcheroo.py
parentee16a95ec8a7f2d207320670a135065981033f61 (diff)
downloadgem5-b3d0f2d66a5bf79f66893adcb85b0ac78daf3f65.tar.xz
tests: Python regression scripts using new print function
Change-Id: I92060da4537e4ff1c0ff665f2f6ffc3850c50e88 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8892 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'tests/configs/switcheroo.py')
-rw-r--r--tests/configs/switcheroo.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/configs/switcheroo.py b/tests/configs/switcheroo.py
index 43bd5eba1..21c6d241d 100644
--- a/tests/configs/switcheroo.py
+++ b/tests/configs/switcheroo.py
@@ -35,6 +35,8 @@
#
# Authors: Andreas Sandberg
+from __future__ import print_function
+
import m5
import _m5
from m5.objects import *
@@ -122,19 +124,20 @@ def run_test(root, switcher=None, freq=1000, verbose=False):
next_cpu = switcher.next()
if verbose:
- print "Switching CPUs..."
- print "Next CPU: %s" % type(next_cpu)
+ print("Switching CPUs...")
+ print("Next CPU: %s" % type(next_cpu))
m5.drain()
if current_cpu != next_cpu:
m5.switchCpus(system, [ (current_cpu, next_cpu) ],
verbose=verbose)
else:
- print "Source CPU and destination CPU are the same, skipping..."
+ print("Source CPU and destination CPU are the same,"
+ " skipping...")
current_cpu = next_cpu
elif exit_cause == "target called exit()" or \
exit_cause == "m5_exit instruction encountered":
sys.exit(0)
else:
- print "Test failed: Unknown exit cause: %s" % exit_cause
+ print("Test failed: Unknown exit cause: %s" % exit_cause)
sys.exit(1)