Changeset 209383b
- Timestamp:
- Dec 4, 2017, 6:10:25 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 099a40d
- Parents:
- bacc36c
- Location:
- src/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/tests/pybin/settings.py ¶
rbacc36c r209383b 17 17 global generating 18 18 global make 19 global debug 20 global debugFlag 19 21 20 22 arch = Architecture(options.arch) … … 22 24 generating = options.regenerate_expected 23 25 make = './make_command_not_initialized' 26 debug = "debug" if options.debug else "no debug" 27 debugFlag = """DEBUG_FLAGS="%s" """ % ("-debug" if debug else "-nodebug") 24 28 25 29 def updateMakeCmd(force, jobs): -
TabularUnified src/tests/pybin/tools.py ¶
rbacc36c r209383b 76 76 '-s' if silent else '', 77 77 test_param, 78 settings.debugFlag, 78 79 flags, 79 80 target, -
TabularUnified src/tests/test.py ¶
rbacc36c r209383b 7 7 8 8 import argparse 9 import functools10 9 import re 11 10 import sys … … 15 14 ################################################################################ 16 15 17 def list_expected():16 def findTests(): 18 17 expected = [] 19 18 … … 37 36 38 37 # tests directly in the .expect folder will always be processed 39 test_list = list_expected()38 test_list = findTests() 40 39 41 40 # if we have a limited number of includes, filter by them … … 120 119 ################################################################################ 121 120 # logic to run a single test and return the result (No handling of printing or other test framework logic) 122 def run_single_test(test , debug):121 def run_single_test(test): 123 122 124 123 # find the output file based on the test name and options flag … … 134 133 rm( (out_file, err_file, test.target()) ) 135 134 136 options = "-debug" if debug else "-nodebug"137 138 135 # build, skipping to next test on error 139 136 make_ret, _ = make( test.target(), 140 flags = """DEBUG_FLAGS="%s" """ % options,141 137 redirects = "2> %s 1> /dev/null" % out_file, 142 138 error_file = err_file … … 180 176 181 177 # run a single test and handle the errors, outputs, printing, exception handling, etc. 182 def run_test_worker(t , debug) :178 def run_test_worker(t) : 183 179 184 180 with SignalHandling(): … … 186 182 name_txt = "%20s " % t.name 187 183 188 retcode, error = run_single_test(t , debug)184 retcode, error = run_single_test(t) 189 185 190 186 # update output based on current action … … 205 201 206 202 # run the given list of tests with the given parameters 207 def run_tests(tests, jobs , debug) :203 def run_tests(tests, jobs) : 208 204 # clean the sandbox from previous commands 209 205 make('clean', redirects = '> /dev/null 2>&1') … … 215 211 try : 216 212 results = pool.map_async( 217 functools.partial(run_test_worker, debug=debug),213 run_test_worker, 218 214 tests, 219 215 chunksize = 1 … … 267 263 268 264 elif options.list : 269 print("Listing for %s:%s"% (settings.arch.toString(), "debug" if options.debug else "no debug"))265 print("Listing for %s:%s"% (settings.arch.toString(), settings.debug)) 270 266 print("\n".join(map(lambda t: "%s" % (t.toString()), tests))) 271 267 … … 277 273 'Regenerate tests' if settings.generating else 'Running', 278 274 settings.arch.toString(), 279 "debug" if options.debug else "no debug",275 settings.debug, 280 276 options.jobs 281 277 )) 282 278 283 279 # otherwise run all tests and make sure to return the correct error code 284 sys.exit( run_tests(tests, options.jobs , options.debug) )280 sys.exit( run_tests(tests, options.jobs) )
Note: See TracChangeset
for help on using the changeset viewer.