summaryrefslogtreecommitdiff
path: root/tests/run.py
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-08-03 18:19:55 -0700
committerNathan Binkert <nate@binkert.org>2008-08-03 18:19:55 -0700
commit50ef39af82413ef463609f24173b22af13fad268 (patch)
tree44fb10aeaf17c5055c2ae315f5bc52e25180a3d3 /tests/run.py
parentede89c2d541051c2ed647e2967712e10b3c0fab0 (diff)
downloadgem5-50ef39af82413ef463609f24173b22af13fad268.tar.xz
sockets: Add a function to disable all listening sockets.
When invoking several copies of m5 on the same machine at the same time, there can be a race for TCP ports for the terminal connections or remote gdb. Expose a function to disable those ports, and have the regression scripts disable them. There are some SimObjects that have no other function than to be used with ports (NativeTrace and EtherTap), so they will panic if the ports are disabled.
Diffstat (limited to 'tests/run.py')
-rw-r--r--tests/run.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/run.py b/tests/run.py
index 9b77ff9d2..aadc16b93 100644
--- a/tests/run.py
+++ b/tests/run.py
@@ -26,7 +26,12 @@
#
# Authors: Steve Reinhardt
-import os, sys
+import os
+import sys
+import m5
+
+# Since we're in batch mode, dont allow tcp socket connections
+m5.disableAllListeners()
# single "path" arg encodes everything we need to know about test
(category, name, isa, opsys, config) = sys.argv[1].split('/')
@@ -57,8 +62,7 @@ execfile(os.path.join(tests_root, 'configs', config + '.py'))
# set default maxtick... script can override
# -1 means run forever
-from m5 import MaxTick
-maxtick = MaxTick
+maxtick = m5.MaxTick
# tweak configuration for specific test