Changeset 76de075
- Timestamp:
- Jul 7, 2020, 5:03:22 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 49cad912
- Parents:
- 4d23dd2
- Location:
- tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/test_run.py
r4d23dd2 r76de075 69 69 else : text = "FAILED with code %d" % retcode 70 70 71 text += " C%s - R%s" % ( cls.fmtDur(duration[0]), cls.fmtDur(duration[1]))71 text += " C%s - R%s" % (fmtDur(duration[0]), fmtDur(duration[1])) 72 72 return text 73 74 @staticmethod75 def fmtDur( duration ):76 if duration :77 hours, rem = divmod(duration, 3600)78 minutes, rem = divmod(rem, 60)79 seconds, millis = divmod(rem, 1)80 return "%2d:%02d.%03d" % (minutes, seconds, millis * 1000)81 return " n/a" -
tests/pybin/tools.py
r4d23dd2 r76de075 387 387 while True: 388 388 yield i.next(max(expire - time.time(), 0)) 389 390 def fmtDur( duration ): 391 if duration : 392 hours, rem = divmod(duration, 3600) 393 minutes, rem = divmod(rem, 60) 394 seconds, millis = divmod(rem, 1) 395 return "%2d:%02d.%03d" % (minutes, seconds, millis * 1000) 396 return " n/a" -
tests/test.py
r4d23dd2 r76de075 361 361 362 362 # for each build configurations, run the test 363 for arch, debug, install in itertools.product(settings.all_arch, settings.all_debug, settings.all_install): 364 settings.arch = arch 365 settings.debug = debug 366 settings.install = install 367 368 # filter out the tests for a different architecture 369 # tests are the same across debug/install 370 local_tests = settings.arch.filter( tests ) 371 options.jobs, forceJobs = job_count( options, local_tests ) 372 settings.update_make_cmd(forceJobs, options.jobs) 373 374 # check the build configuration works 375 settings.validate() 376 377 # print configuration 378 print('%s %i tests on %i cores (%s:%s)' % ( 379 'Regenerating' if settings.generating else 'Running', 380 len(local_tests), 381 options.jobs, 382 settings.arch.string, 383 settings.debug.string 384 )) 385 386 # otherwise run all tests and make sure to return the correct error code 387 failed = run_tests(local_tests, options.jobs) 388 if failed: 389 result = 1 390 if not settings.continue_: 391 break 392 393 363 with Timed() as total_dur: 364 for arch, debug, install in itertools.product(settings.all_arch, settings.all_debug, settings.all_install): 365 settings.arch = arch 366 settings.debug = debug 367 settings.install = install 368 369 # filter out the tests for a different architecture 370 # tests are the same across debug/install 371 local_tests = settings.arch.filter( tests ) 372 options.jobs, forceJobs = job_count( options, local_tests ) 373 settings.update_make_cmd(forceJobs, options.jobs) 374 375 # check the build configuration works 376 settings.validate() 377 378 # print configuration 379 print('%s %i tests on %i cores (%s:%s)' % ( 380 'Regenerating' if settings.generating else 'Running', 381 len(local_tests), 382 options.jobs, 383 settings.arch.string, 384 settings.debug.string 385 )) 386 387 # otherwise run all tests and make sure to return the correct error code 388 failed = run_tests(local_tests, options.jobs) 389 if failed: 390 result = 1 391 if not settings.continue_: 392 break 393 394 print('Tests took %s' % fmtDur( total_dur.duration )) 394 395 sys.exit( failed )
Note: See TracChangeset
for help on using the changeset viewer.