run.py (11475:d372458be20f) | run.py (12575:16ada03839d9) |
---|---|
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 --- 24 unchanged lines hidden (view full) --- 33# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 34# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38# 39# Authors: Steve Reinhardt 40 | 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 --- 24 unchanged lines hidden (view full) --- 33# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 34# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38# 39# Authors: Steve Reinhardt 40 |
41from __future__ import print_function 42 |
|
41import os 42import sys 43import re 44import string 45 46from os.path import join as joinpath 47import os.path 48import os 49 50import m5 51 52def skip_test(reason=""): 53 """Signal that a test should be skipped and optionally print why. 54 55 Keyword arguments: 56 reason -- Reason why the test failed. Output is omitted if empty. 57 """ 58 59 if reason: | 43import os 44import sys 45import re 46import string 47 48from os.path import join as joinpath 49import os.path 50import os 51 52import m5 53 54def skip_test(reason=""): 55 """Signal that a test should be skipped and optionally print why. 56 57 Keyword arguments: 58 reason -- Reason why the test failed. Output is omitted if empty. 59 """ 60 61 if reason: |
60 print "Skipping test: %s" % reason | 62 print("Skipping test: %s" % reason) |
61 sys.exit(2) 62 63def has_sim_object(name): 64 """Test if a SimObject exists in the simulator. 65 66 Arguments: 67 name -- Name of SimObject (string) 68 --- 69 unchanged lines hidden (view full) --- 138def run_test(root): 139 """Default run_test implementations. Scripts can override it.""" 140 141 # instantiate configuration 142 m5.instantiate() 143 144 # simulate until program terminates 145 exit_event = m5.simulate(maxtick) | 63 sys.exit(2) 64 65def has_sim_object(name): 66 """Test if a SimObject exists in the simulator. 67 68 Arguments: 69 name -- Name of SimObject (string) 70 --- 69 unchanged lines hidden (view full) --- 140def run_test(root): 141 """Default run_test implementations. Scripts can override it.""" 142 143 # instantiate configuration 144 m5.instantiate() 145 146 # simulate until program terminates 147 exit_event = m5.simulate(maxtick) |
146 print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause() | 148 print('Exiting @ tick', m5.curTick(), 'because', exit_event.getCause()) |
147 148# Since we're in batch mode, dont allow tcp socket connections 149m5.disableAllListeners() 150 151# single "path" arg encodes everything we need to know about test 152(category, mode, name, isa, opsys, config) = sys.argv[1].split('/')[-6:] 153 154# find path to directory containing this file --- 67 unchanged lines hidden --- | 149 150# Since we're in batch mode, dont allow tcp socket connections 151m5.disableAllListeners() 152 153# single "path" arg encodes everything we need to know about test 154(category, mode, name, isa, opsys, config) = sys.argv[1].split('/')[-6:] 155 156# find path to directory containing this file --- 67 unchanged lines hidden --- |