summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2013-11-14 15:03:42 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2013-11-14 15:03:42 -0800
commita2c21d47a8cd6a1a633491fb58b9d3b1c45c965d (patch)
tree733ee7207bef8cd7277ebd04a275b7a3e5253224 /src/python
parent99d6c3b7e004477dae9b3f7c59c24056362affd8 (diff)
downloadgem5-a2c21d47a8cd6a1a633491fb58b9d3b1c45c965d.tar.xz
tests: suppress output on switcheroo tests
The output from the switcheroo tests is voluminous and (because it includes timestamps) highly sensitive to minor changes, leading to extremely large updates to the reference outputs. This patch addresses this problem by suppressing output from the tests. An internal parameter can be set to enable the output. Wiring that up to a command-line flag (perhaps even the rudimantary -v/-q options in m5/main.py) is left for future work.
Diffstat (limited to 'src/python')
-rw-r--r--src/python/m5/simulate.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py
index a3ca77af1..322257139 100644
--- a/src/python/m5/simulate.py
+++ b/src/python/m5/simulate.py
@@ -218,7 +218,7 @@ def _changeMemoryMode(system, mode):
else:
print "System already in target mode. Memory mode unchanged."
-def switchCpus(system, cpuList, do_drain=True):
+def switchCpus(system, cpuList, do_drain=True, verbose=True):
"""Switch CPUs in a system.
By default, this method drains and resumes the system. This
@@ -238,7 +238,10 @@ def switchCpus(system, cpuList, do_drain=True):
Keyword Arguments:
do_drain -- Perform a drain/resume of the system when switching.
"""
- print "switching cpus"
+
+ if verbose:
+ print "switching cpus"
+
if not isinstance(cpuList, list):
raise RuntimeError, "Must pass a list to this function"
for item in cpuList: