SConscript revision 10742:cb77dfd5db54
1955SN/A# -*- mode:python -*- 2955SN/A 312230Sgiacomo.travaglini@arm.com# Copyright (c) 2004-2006 The Regents of The University of Michigan 49812Sandreas.hansson@arm.com# All rights reserved. 59812Sandreas.hansson@arm.com# 69812Sandreas.hansson@arm.com# Redistribution and use in source and binary forms, with or without 79812Sandreas.hansson@arm.com# modification, are permitted provided that the following conditions are 89812Sandreas.hansson@arm.com# met: redistributions of source code must retain the above copyright 99812Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer; 109812Sandreas.hansson@arm.com# redistributions in binary form must reproduce the above copyright 119812Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer in the 129812Sandreas.hansson@arm.com# documentation and/or other materials provided with the distribution; 139812Sandreas.hansson@arm.com# neither the name of the copyright holders nor the names of its 149812Sandreas.hansson@arm.com# contributors may be used to endorse or promote products derived from 157816Ssteve.reinhardt@amd.com# this software without specific prior written permission. 165871Snate@binkert.org# 171762SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18955SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19955SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20955SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21955SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22955SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23955SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24955SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25955SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26955SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27955SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28955SN/A# 29955SN/A# Authors: Steve Reinhardt 30955SN/A# Kevin Lim 31955SN/A 32955SN/Aimport os, signal 33955SN/Aimport sys, time 34955SN/Aimport glob 35955SN/Afrom SCons.Script.SConscript import SConsEnvironment 36955SN/A 37955SN/AImport('env') 38955SN/A 39955SN/Aenv['DIFFOUT'] = File('diff-out') 40955SN/A 41955SN/A# get the termcap from the environment 422665Ssaidi@eecs.umich.edutermcap = env['TERMCAP'] 432665Ssaidi@eecs.umich.edu 445863Snate@binkert.org# Dict that accumulates lists of tests by category (quick, medium, long) 45955SN/Aenv.Tests = {} 46955SN/A 47955SN/Adef contents(node): 48955SN/A return file(str(node)).read() 49955SN/A 508878Ssteve.reinhardt@amd.com# functions to parse return value from scons Execute()... not the same 512632Sstever@eecs.umich.edu# as wait() etc., so python built-in os funcs don't work. 528878Ssteve.reinhardt@amd.comdef signaled(status): 532632Sstever@eecs.umich.edu return (status & 0x80) != 0; 54955SN/A 558878Ssteve.reinhardt@amd.comdef signum(status): 562632Sstever@eecs.umich.edu return (status & 0x7f); 572761Sstever@eecs.umich.edu 582632Sstever@eecs.umich.edu# List of signals that indicate that we should retry the test rather 592632Sstever@eecs.umich.edu# than consider it failed. 602632Sstever@eecs.umich.eduretry_signals = (signal.SIGTERM, signal.SIGKILL, signal.SIGINT, 612761Sstever@eecs.umich.edu signal.SIGQUIT, signal.SIGHUP) 622761Sstever@eecs.umich.edu 632761Sstever@eecs.umich.edu# regular expressions of lines to ignore when diffing outputs 648878Ssteve.reinhardt@amd.comoutput_ignore_regexes = ( 658878Ssteve.reinhardt@amd.com '^command line:', # for stdout file 662761Sstever@eecs.umich.edu '^gem5 compiled ', # for stderr file 672761Sstever@eecs.umich.edu '^gem5 started ', # for stderr file 682761Sstever@eecs.umich.edu '^gem5 executing on ', # for stderr file 692761Sstever@eecs.umich.edu '^Simulation complete at', # for stderr file 702761Sstever@eecs.umich.edu '^Listening for', # for stderr file 718878Ssteve.reinhardt@amd.com 'listening for remote gdb', # for stderr file 728878Ssteve.reinhardt@amd.com ) 732632Sstever@eecs.umich.edu 742632Sstever@eecs.umich.eduoutput_ignore_args = ' '.join(["-I '"+s+"'" for s in output_ignore_regexes]) 758878Ssteve.reinhardt@amd.com 768878Ssteve.reinhardt@amd.comoutput_ignore_args += ' --exclude=stats.txt --exclude=outdiff' 772632Sstever@eecs.umich.edu 78955SN/Adef run_test(target, source, env): 79955SN/A """Check output from running test. 80955SN/A 8112563Sgabeblack@google.com Targets are as follows: 8212563Sgabeblack@google.com target[0] : status 836654Snate@binkert.org 8410196SCurtis.Dunham@arm.com Sources are: 85955SN/A source[0] : gem5 binary 865396Ssaidi@eecs.umich.edu source[1] : tests/run.py script 8711401Sandreas.sandberg@arm.com source[2] : reference stats file 885863Snate@binkert.org 895863Snate@binkert.org """ 904202Sbinkertn@umich.edu # make sure target files are all gone 915863Snate@binkert.org for t in target: 925863Snate@binkert.org if os.path.exists(t.abspath): 935863Snate@binkert.org env.Execute(Delete(t.abspath)) 945863Snate@binkert.org 95955SN/A tgt_dir = os.path.dirname(str(target[0])) 966654Snate@binkert.org 975273Sstever@gmail.com # Base command for running test. We mess around with indirectly 985871Snate@binkert.org # referring to files via SOURCES and TARGETS so that scons can mess 995273Sstever@gmail.com # with paths all it wants to and we still get the right files. 1006654Snate@binkert.org cmd = '${SOURCES[0]} -d %s -re ${SOURCES[1]} %s' % (tgt_dir, tgt_dir) 1015396Ssaidi@eecs.umich.edu 1028120Sgblack@eecs.umich.edu # Prefix test run with batch job submission command if appropriate. 1038120Sgblack@eecs.umich.edu # Batch command also supports timeout arg (in seconds, not minutes). 1048120Sgblack@eecs.umich.edu timeout = 15 * 60 # used to be a param, probably should be again 1058120Sgblack@eecs.umich.edu if env['BATCH']: 1068120Sgblack@eecs.umich.edu cmd = '%s -t %d %s' % (env['BATCH_CMD'], timeout, cmd) 1078120Sgblack@eecs.umich.edu # The slowest regression (bzip2) requires ~4 hours; 1088120Sgblack@eecs.umich.edu # 5 hours was chosen to be conservative. 1098120Sgblack@eecs.umich.edu elif env['TIMEOUT']: 1108879Ssteve.reinhardt@amd.com cmd = 'timeout --foreground 5h %s' % cmd 1118879Ssteve.reinhardt@amd.com 1128879Ssteve.reinhardt@amd.com # Create a default value for the status string, changed as needed 1138879Ssteve.reinhardt@amd.com # based on the status. 1148879Ssteve.reinhardt@amd.com status_str = "passed." 1158879Ssteve.reinhardt@amd.com 1168879Ssteve.reinhardt@amd.com pre_exec_time = time.time() 1178879Ssteve.reinhardt@amd.com status = env.Execute(env.subst(cmd, target=target, source=source)) 1188879Ssteve.reinhardt@amd.com if status == 0: 1198879Ssteve.reinhardt@amd.com # gem5 terminated normally. 1208879Ssteve.reinhardt@amd.com # Run diff on output & ref directories to find differences. 1218879Ssteve.reinhardt@amd.com # Exclude the stats file since we will use diff-out on that. 1228879Ssteve.reinhardt@amd.com 1238120Sgblack@eecs.umich.edu # NFS file systems can be annoying and not have updated yet 1248120Sgblack@eecs.umich.edu # wait until we see the file modified 1258120Sgblack@eecs.umich.edu statsdiff = os.path.join(tgt_dir, 'statsdiff') 1268120Sgblack@eecs.umich.edu m_time = 0 1278120Sgblack@eecs.umich.edu nap = 0 1288120Sgblack@eecs.umich.edu while m_time < pre_exec_time and nap < 10: 1298120Sgblack@eecs.umich.edu try: 1308120Sgblack@eecs.umich.edu m_time = os.stat(statsdiff).st_mtime 1318120Sgblack@eecs.umich.edu except OSError: 1328120Sgblack@eecs.umich.edu pass 1338120Sgblack@eecs.umich.edu time.sleep(1) 1348120Sgblack@eecs.umich.edu nap += 1 1358120Sgblack@eecs.umich.edu 1368120Sgblack@eecs.umich.edu outdiff = os.path.join(tgt_dir, 'outdiff') 1378879Ssteve.reinhardt@amd.com # tack 'true' on the end so scons doesn't report diff's 1388879Ssteve.reinhardt@amd.com # non-zero exit code as a build error 1398879Ssteve.reinhardt@amd.com diffcmd = 'diff -ubrs %s ${SOURCES[2].dir} %s > %s; true' \ 1408879Ssteve.reinhardt@amd.com % (output_ignore_args, tgt_dir, outdiff) 14110458Sandreas.hansson@arm.com env.Execute(env.subst(diffcmd, target=target, source=source)) 14210458Sandreas.hansson@arm.com print "===== Output differences =====" 14310458Sandreas.hansson@arm.com print contents(outdiff) 1448879Ssteve.reinhardt@amd.com # Run diff-out on stats.txt file 1458879Ssteve.reinhardt@amd.com diffcmd = '$DIFFOUT ${SOURCES[2]} %s > %s' \ 1468879Ssteve.reinhardt@amd.com % (os.path.join(tgt_dir, 'stats.txt'), statsdiff) 1478879Ssteve.reinhardt@amd.com diffcmd = env.subst(diffcmd, target=target, source=source) 1489227Sandreas.hansson@arm.com diff_status = env.Execute(diffcmd, strfunction=None) 1499227Sandreas.hansson@arm.com # If there is a difference, change the status string to say so 15012063Sgabeblack@google.com if diff_status != 0: 15112063Sgabeblack@google.com status_str = "CHANGED!" 15212063Sgabeblack@google.com print "===== Statistics differences =====" 1538879Ssteve.reinhardt@amd.com print contents(statsdiff) 1548879Ssteve.reinhardt@amd.com 1558879Ssteve.reinhardt@amd.com else: # gem5 exit status != 0 1568879Ssteve.reinhardt@amd.com # Consider it a failed test unless the exit status is 2 15710453SAndrew.Bardsley@arm.com status_str = "FAILED!" 15810453SAndrew.Bardsley@arm.com # gem5 did not terminate properly, so no need to check the output 15910453SAndrew.Bardsley@arm.com if env['TIMEOUT'] and status == 124: 16010456SCurtis.Dunham@arm.com status_str = "TIMED-OUT!" 16110456SCurtis.Dunham@arm.com elif signaled(status): 16210456SCurtis.Dunham@arm.com print 'gem5 terminated with signal', signum(status) 16310457Sandreas.hansson@arm.com if signum(status) in retry_signals: 16410457Sandreas.hansson@arm.com # Consider the test incomplete; don't create a 'status' output. 16511342Sandreas.hansson@arm.com # Hand the return status to scons and let scons decide what 16611342Sandreas.hansson@arm.com # to do about it (typically terminate unless run with -k). 1678120Sgblack@eecs.umich.edu return status 16812063Sgabeblack@google.com elif status == 2: 16912563Sgabeblack@google.com # The test was skipped, change the status string to say so 17012063Sgabeblack@google.com status_str = "skipped." 17112063Sgabeblack@google.com else: 1725871Snate@binkert.org print 'gem5 exited with non-zero status', status 1735871Snate@binkert.org # complete but failed execution (call to exit() with non-zero 1746121Snate@binkert.org # status, SIGABORT due to assertion failure, etc.)... fall through 1755871Snate@binkert.org # and generate FAILED status as if output comparison had failed 1765871Snate@binkert.org 1779926Sstan.czerniawski@arm.com # Generate status file contents based on exit status of gem5 and diff-out 17812243Sgabeblack@google.com f = file(str(target[0]), 'w') 1791533SN/A print >>f, tgt_dir, status_str 18012246Sgabeblack@google.com f.close() 18112246Sgabeblack@google.com # done 18212246Sgabeblack@google.com return 0 18312246Sgabeblack@google.com 1849239Sandreas.hansson@arm.comdef run_test_string(target, source, env): 1859239Sandreas.hansson@arm.com return env.subst("Running test in ${TARGETS[0].dir}.", 1869239Sandreas.hansson@arm.com target=target, source=source) 1879239Sandreas.hansson@arm.com 18812563Sgabeblack@google.comtestAction = env.Action(run_test, run_test_string) 1899239Sandreas.hansson@arm.com 1909239Sandreas.hansson@arm.comdef print_test(target, source, env): 191955SN/A # print the status with colours to make it easier to see what 192955SN/A # passed and what failed 1932632Sstever@eecs.umich.edu line = contents(source[0]) 1942632Sstever@eecs.umich.edu 195955SN/A # split the line to words and get the last one 196955SN/A words = line.split() 197955SN/A status = words[-1] 198955SN/A 1998878Ssteve.reinhardt@amd.com # if the test failed make it red, if it passed make it green, and 200955SN/A # skip the punctuation 2012632Sstever@eecs.umich.edu if status == "FAILED!" or status == "TIMED-OUT!": 2022632Sstever@eecs.umich.edu status = termcap.Red + status[:-1] + termcap.Normal + status[-1] 2032632Sstever@eecs.umich.edu elif status == "CHANGED!": 2042632Sstever@eecs.umich.edu status = termcap.Yellow + status[:-1] + termcap.Normal + status[-1] 2052632Sstever@eecs.umich.edu elif status == "passed.": 2062632Sstever@eecs.umich.edu status = termcap.Green + status[:-1] + termcap.Normal + status[-1] 2072632Sstever@eecs.umich.edu elif status == "skipped.": 2088268Ssteve.reinhardt@amd.com status = termcap.Cyan + status[:-1] + termcap.Normal + status[-1] 2098268Ssteve.reinhardt@amd.com 2108268Ssteve.reinhardt@amd.com # put it back in the list and join with space 2118268Ssteve.reinhardt@amd.com words[-1] = status 2128268Ssteve.reinhardt@amd.com line = " ".join(words) 2138268Ssteve.reinhardt@amd.com 2148268Ssteve.reinhardt@amd.com print '***** ' + line 2152632Sstever@eecs.umich.edu return 0 2162632Sstever@eecs.umich.edu 2172632Sstever@eecs.umich.eduprintAction = env.Action(print_test, strfunction = None) 2182632Sstever@eecs.umich.edu 2198268Ssteve.reinhardt@amd.com# Static vars for update_test: 2202632Sstever@eecs.umich.edu# - long-winded message about ignored sources 2218268Ssteve.reinhardt@amd.comignore_msg = ''' 2228268Ssteve.reinhardt@amd.comNote: The following file(s) will not be copied. New non-standard 2238268Ssteve.reinhardt@amd.com output files must be copied manually once before --update-ref will 2248268Ssteve.reinhardt@amd.com recognize them as outputs. Otherwise they are assumed to be 2253718Sstever@eecs.umich.edu inputs and are ignored. 2262634Sstever@eecs.umich.edu''' 2272634Sstever@eecs.umich.edu# - reference files always needed 2285863Snate@binkert.orgneeded_files = set(['simout', 'simerr', 'stats.txt', 'config.ini']) 2292638Sstever@eecs.umich.edu# - source files we always want to ignore 2308268Ssteve.reinhardt@amd.comknown_ignores = set(['status', 'outdiff', 'statsdiff']) 2312632Sstever@eecs.umich.edu 2322632Sstever@eecs.umich.edudef update_test(target, source, env): 2332632Sstever@eecs.umich.edu """Update reference test outputs. 2342632Sstever@eecs.umich.edu 23512563Sgabeblack@google.com Target is phony. First two sources are the ref & new stats.txt file 2361858SN/A files, respectively. We actually copy everything in the 2373716Sstever@eecs.umich.edu respective directories except the status & diff output files. 2382638Sstever@eecs.umich.edu 2392638Sstever@eecs.umich.edu """ 2402638Sstever@eecs.umich.edu dest_dir = str(source[0].get_dir()) 2412638Sstever@eecs.umich.edu src_dir = str(source[1].get_dir()) 24212563Sgabeblack@google.com dest_files = set(os.listdir(dest_dir)) 24312563Sgabeblack@google.com src_files = set(os.listdir(src_dir)) 2442638Sstever@eecs.umich.edu # Copy all of the required files plus any existing dest files. 2455863Snate@binkert.org wanted_files = needed_files | dest_files 2465863Snate@binkert.org missing_files = wanted_files - src_files 2475863Snate@binkert.org if len(missing_files) > 0: 248955SN/A print " WARNING: the following file(s) are missing " \ 2495341Sstever@gmail.com "and will not be updated:" 2505341Sstever@gmail.com print " ", " ,".join(missing_files) 2515863Snate@binkert.org copy_files = wanted_files - missing_files 2527756SAli.Saidi@ARM.com warn_ignored_files = (src_files - copy_files) - known_ignores 2535341Sstever@gmail.com if len(warn_ignored_files) > 0: 2546121Snate@binkert.org print ignore_msg, 2554494Ssaidi@eecs.umich.edu print " ", ", ".join(warn_ignored_files) 2566121Snate@binkert.org for f in copy_files: 2571105SN/A if f in dest_files: 2582667Sstever@eecs.umich.edu print " Replacing file", f 2592667Sstever@eecs.umich.edu dest_files.remove(f) 2602667Sstever@eecs.umich.edu else: 2612667Sstever@eecs.umich.edu print " Creating new file", f 2626121Snate@binkert.org copyAction = Copy(os.path.join(dest_dir, f), os.path.join(src_dir, f)) 2632667Sstever@eecs.umich.edu copyAction.strfunction = None 2645341Sstever@gmail.com env.Execute(copyAction) 2655863Snate@binkert.org return 0 2665341Sstever@gmail.com 2675341Sstever@gmail.comdef update_test_string(target, source, env): 2685341Sstever@gmail.com return env.subst("Updating ${SOURCES[0].dir} from ${SOURCES[1].dir}", 2698120Sgblack@eecs.umich.edu target=target, source=source) 2705341Sstever@gmail.com 2718120Sgblack@eecs.umich.eduupdateAction = env.Action(update_test, update_test_string) 2725341Sstever@gmail.com 2738120Sgblack@eecs.umich.edudef test_builder(env, ref_dir): 2746121Snate@binkert.org """Define a test.""" 2756121Snate@binkert.org 2769396Sandreas.hansson@arm.com path = list(ref_dir.split('/')) 2775397Ssaidi@eecs.umich.edu 2785397Ssaidi@eecs.umich.edu # target path (where test output goes) consists of category, mode, 2797727SAli.Saidi@ARM.com # name, isa, opsys, and config (skips the 'ref' component) 2808268Ssteve.reinhardt@amd.com assert(path.pop(-4) == 'ref') 2816168Snate@binkert.org tgt_dir = os.path.join(*path[-6:]) 2825341Sstever@gmail.com 2838120Sgblack@eecs.umich.edu # local closure for prepending target path to filename 2848120Sgblack@eecs.umich.edu def tgt(f): 2858120Sgblack@eecs.umich.edu return os.path.join(tgt_dir, f) 2866814Sgblack@eecs.umich.edu 2875863Snate@binkert.org ref_stats = os.path.join(ref_dir, 'stats.txt') 2888120Sgblack@eecs.umich.edu new_stats = tgt('stats.txt') 2895341Sstever@gmail.com status_file = tgt('status') 2905863Snate@binkert.org 2918268Ssteve.reinhardt@amd.com env.Command([status_file, new_stats], 2926121Snate@binkert.org [env.M5Binary, 'run.py', ref_stats], 2936121Snate@binkert.org testAction) 2948268Ssteve.reinhardt@amd.com 2955742Snate@binkert.org # phony target to echo status 2965742Snate@binkert.org if GetOption('update_ref'): 2975341Sstever@gmail.com p = env.Command(tgt('_update'), 2985742Snate@binkert.org [ref_stats, new_stats, status_file], 2995742Snate@binkert.org updateAction) 3005341Sstever@gmail.com else: 3016017Snate@binkert.org p = env.Command(tgt('_print'), [status_file], printAction) 3026121Snate@binkert.org 3036017Snate@binkert.org env.AlwaysBuild(p) 30412158Sandreas.sandberg@arm.com 30512158Sandreas.sandberg@arm.com 30612158Sandreas.sandberg@arm.com# Figure out applicable configs based on build type 3078120Sgblack@eecs.umich.educonfigs = [] 3087756SAli.Saidi@ARM.comif env['TARGET_ISA'] == 'alpha': 3097756SAli.Saidi@ARM.com configs += ['tsunami-simple-atomic', 3107756SAli.Saidi@ARM.com 'tsunami-simple-timing', 3117756SAli.Saidi@ARM.com 'tsunami-simple-atomic-dual', 3127816Ssteve.reinhardt@amd.com 'tsunami-simple-timing-dual', 3137816Ssteve.reinhardt@amd.com 'twosys-tsunami-simple-atomic', 3147816Ssteve.reinhardt@amd.com 'tsunami-o3', 'tsunami-o3-dual', 3157816Ssteve.reinhardt@amd.com 'tsunami-minor', 'tsunami-minor-dual', 3167816Ssteve.reinhardt@amd.com 'tsunami-switcheroo-full'] 31711979Sgabeblack@google.comif env['TARGET_ISA'] == 'sparc': 3187816Ssteve.reinhardt@amd.com configs += ['t1000-simple-atomic', 3197816Ssteve.reinhardt@amd.com 't1000-simple-timing'] 3207816Ssteve.reinhardt@amd.comif env['TARGET_ISA'] == 'arm': 3217816Ssteve.reinhardt@amd.com configs += ['simple-atomic-dummychecker', 3227756SAli.Saidi@ARM.com 'o3-timing-checker', 3237756SAli.Saidi@ARM.com 'realview-simple-atomic', 3249227Sandreas.hansson@arm.com 'realview-simple-atomic-dual', 3259227Sandreas.hansson@arm.com 'realview-simple-timing', 3269227Sandreas.hansson@arm.com 'realview-simple-timing-dual', 3279227Sandreas.hansson@arm.com 'realview-o3', 3289590Sandreas@sandberg.pp.se 'realview-o3-checker', 3299590Sandreas@sandberg.pp.se 'realview-o3-dual', 3309590Sandreas@sandberg.pp.se 'realview-minor', 3319590Sandreas@sandberg.pp.se 'realview-minor-dual', 3329590Sandreas@sandberg.pp.se 'realview-switcheroo-atomic', 3339590Sandreas@sandberg.pp.se 'realview-switcheroo-timing', 3346654Snate@binkert.org 'realview-switcheroo-o3', 3356654Snate@binkert.org 'realview-switcheroo-full', 3365871Snate@binkert.org 'realview64-simple-atomic', 3376121Snate@binkert.org 'realview64-simple-atomic-dual', 3388946Sandreas.hansson@arm.com 'realview64-simple-timing', 3399419Sandreas.hansson@arm.com 'realview64-simple-timing-dual', 34012563Sgabeblack@google.com 'realview64-o3', 3413918Ssaidi@eecs.umich.edu 'realview64-o3-checker', 3423918Ssaidi@eecs.umich.edu 'realview64-o3-dual', 3431858SN/A 'realview64-minor', 3449556Sandreas.hansson@arm.com 'realview64-minor-dual', 3459556Sandreas.hansson@arm.com 'realview64-switcheroo-atomic', 3469556Sandreas.hansson@arm.com 'realview64-switcheroo-timing', 3479556Sandreas.hansson@arm.com 'realview64-switcheroo-o3', 34811294Sandreas.hansson@arm.com 'realview64-switcheroo-full'] 34911294Sandreas.hansson@arm.comif env['TARGET_ISA'] == 'x86': 35011294Sandreas.hansson@arm.com configs += ['pc-simple-atomic', 35111294Sandreas.hansson@arm.com 'pc-simple-timing', 35210878Sandreas.hansson@arm.com 'pc-o3-timing', 35310878Sandreas.hansson@arm.com 'pc-switcheroo-full'] 35411811Sbaz21@cam.ac.uk 35511811Sbaz21@cam.ac.ukconfigs += ['simple-atomic', 'simple-atomic-mp', 35611811Sbaz21@cam.ac.uk 'simple-timing', 'simple-timing-mp', 35711982Sgabeblack@google.com 'minor-timing', 'minor-timing-mp', 35811982Sgabeblack@google.com 'o3-timing', 'o3-timing-mp', 35911982Sgabeblack@google.com 'rubytest', 'memtest', 'memtest-filter', 36011982Sgabeblack@google.com 'tgen-simple-mem', 'tgen-dram-ctrl'] 36111992Sgabeblack@google.com 36211982Sgabeblack@google.comif env['PROTOCOL'] != 'None': 36311982Sgabeblack@google.com if env['PROTOCOL'] == 'MI_example': 36412305Sgabeblack@google.com configs += [c + "-ruby" for c in configs] 36512305Sgabeblack@google.com else: 36612305Sgabeblack@google.com configs = [c + "-ruby-" + env['PROTOCOL'] for c in configs] 36712305Sgabeblack@google.com 36812305Sgabeblack@google.comsrc = Dir('.').srcdir 36912305Sgabeblack@google.comfor config in configs: 37012305Sgabeblack@google.com dirs = src.glob('*/*/*/ref/%s/*/%s' % (env['TARGET_ISA'], config)) 3719556Sandreas.hansson@arm.com for d in dirs: 37212563Sgabeblack@google.com d = str(d) 37312563Sgabeblack@google.com if not os.path.exists(os.path.join(d, 'skip')): 37412563Sgabeblack@google.com test_builder(env, d) 37512563Sgabeblack@google.com