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 |
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: |
62 print("Skipping test: %s" % reason) |
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) |
148 print('Exiting @ tick', m5.curTick(), 'because', exit_event.getCause()) |
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 --- |