Changes in tests/test.py [b053083:172a88d]
- File:
-
- 1 edited
-
tests/test.py (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/test.py
rb053083 r172a88d 140 140 parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true') 141 141 parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='') 142 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously , 0 (default) for unlimited', nargs='?', const=0, type=int)142 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int) 143 143 parser.add_argument('--list-comp', help='List all valide arguments', action='store_true') 144 144 parser.add_argument('--list-dist', help='List all tests for distribution', action='store_true') … … 195 195 # build, skipping to next test on error 196 196 with Timed() as comp_dur: 197 make_ret, _ , _= make( test.target(), output_file=subprocess.DEVNULL, error=out_file, error_file = err_file )197 make_ret, _ = make( test.target(), output_file=subprocess.DEVNULL, error=out_file, error_file = err_file ) 198 198 199 199 # ---------- … … 208 208 if settings.dry_run or is_exe(exe_file): 209 209 # run test 210 retcode, _ , _= sh(exe_file, output_file=out_file, input_file=in_file, timeout=True)210 retcode, _ = sh(exe_file, output_file=out_file, input_file=in_file, timeout=True) 211 211 else : 212 212 # simply cat the result into the output … … 226 226 else : 227 227 # fetch return code and error from the diff command 228 retcode, error , _= diff(cmp_file, out_file)228 retcode, error = diff(cmp_file, out_file) 229 229 230 230 else: … … 366 366 print(os.path.relpath(t.expect(), settings.SRCDIR), end=' ') 367 367 print(os.path.relpath(t.input() , settings.SRCDIR), end=' ') 368 code, out , err= make_recon(t.target())368 code, out = make_recon(t.target()) 369 369 370 370 if code != 0: 371 print('ERROR: recond failed for test {} : {} \'{}\''.format(t.target(), code, err), file=sys.stderr)371 print('ERROR: recond failed for test {}'.format(t.target()), file=sys.stderr) 372 372 sys.exit(1) 373 373 … … 417 417 if is_empty(t.expect()): 418 418 print('WARNING: test "{}" has empty .expect file'.format(t.target()), file=sys.stderr) 419 420 options.jobs = job_count( options )421 419 422 420 # for each build configurations, run the test … … 432 430 local_tests = settings.ast.filter( tests ) 433 431 local_tests = settings.arch.filter( local_tests ) 432 options.jobs, forceJobs = job_count( options, local_tests ) 433 settings.update_make_cmd(forceJobs, options.jobs) 434 434 435 435 # check the build configuration works 436 436 settings.validate() 437 jobs = min(options.jobs, len(local_tests))438 437 439 438 # print configuration … … 441 440 'Regenerating' if settings.generating else 'Running', 442 441 len(local_tests), 443 jobs,442 options.jobs, 444 443 settings.ast.string, 445 444 settings.arch.string, … … 451 450 452 451 # otherwise run all tests and make sure to return the correct error code 453 failed = run_tests(local_tests, jobs)452 failed = run_tests(local_tests, options.jobs) 454 453 if failed: 455 454 if not settings.continue_:
Note:
See TracChangeset
for help on using the changeset viewer.