run.py (9401:9f0918fbb07f) run.py (9447:156f74caf0d4)
1# Copyright (c) 2012 ARM Limited
2# All rights reserved
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 79 unchanged lines hidden (view full) ---

88 return
89 else:
90 msg = "Test requires the '%s' SimObject." % name
91 if fatal:
92 m5.fatal(msg)
93 else:
94 skip_test(msg)
95
1# Copyright (c) 2012 ARM Limited
2# All rights reserved
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 79 unchanged lines hidden (view full) ---

88 return
89 else:
90 msg = "Test requires the '%s' SimObject." % name
91 if fatal:
92 m5.fatal(msg)
93 else:
94 skip_test(msg)
95
96def run_test(root):
97 """Default run_test implementations. Scripts can override it."""
98
99 # instantiate configuration
100 m5.instantiate()
101
102 # simulate until program terminates
103 exit_event = m5.simulate(maxtick)
104 print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause()
105
96# Since we're in batch mode, dont allow tcp socket connections
97m5.disableAllListeners()
98
99# single "path" arg encodes everything we need to know about test
100(category, mode, name, isa, opsys, config) = sys.argv[1].split('/')[-6:]
101
102# find path to directory containing this file
103tests_root = os.path.dirname(__file__)

--- 51 unchanged lines hidden (view full) ---

155 initCPU(sys.cpu)
156
157# We might be creating a single system or a dual system. Try
158# initializing the CPUs in all known system attributes.
159for sysattr in [ "system", "testsys", "drivesys" ]:
160 if hasattr(root, sysattr):
161 initCPUs(getattr(root, sysattr))
162
106# Since we're in batch mode, dont allow tcp socket connections
107m5.disableAllListeners()
108
109# single "path" arg encodes everything we need to know about test
110(category, mode, name, isa, opsys, config) = sys.argv[1].split('/')[-6:]
111
112# find path to directory containing this file
113tests_root = os.path.dirname(__file__)

--- 51 unchanged lines hidden (view full) ---

165 initCPU(sys.cpu)
166
167# We might be creating a single system or a dual system. Try
168# initializing the CPUs in all known system attributes.
169for sysattr in [ "system", "testsys", "drivesys" ]:
170 if hasattr(root, sysattr):
171 initCPUs(getattr(root, sysattr))
172
163# instantiate configuration
164m5.instantiate()
165
166# simulate until program terminates
167exit_event = m5.simulate(maxtick)
168
169print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause()
173run_test(root)