Changes in tests/test.py [dcfedca:d65f92c]
- File:
-
- 1 edited
-
tests/test.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/test.py
rdcfedca rd65f92c 91 91 parser.add_argument('--all', help='Run all test available', action='store_true') 92 92 parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true') 93 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='')94 93 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int) 95 94 parser.add_argument('--list-comp', help='List all valide arguments', action='store_true') … … 143 142 # build, skipping to next test on error 144 143 with Timed() as comp_dur: 145 make_ret, _ = make( test.target(), output =subprocess.DEVNULL, error=out_file, error_file = err_file )144 make_ret, _ = make( test.target(), output_file=subprocess.DEVNULL, error=out_file, error_file = err_file ) 146 145 147 146 run_dur = None … … 153 152 if settings.dry_run or is_exe(exe_file): 154 153 # run test 155 retcode, _ = sh(exe_file, output =out_file, input=in_file, timeout=True)154 retcode, _ = sh(exe_file, output_file=out_file, input_file=in_file, timeout=True) 156 155 else : 157 156 # simply cat the result into the output … … 180 179 error = error + info if error else info 181 180 182 if settings.archive:183 error = error + '\n' + core_archive(settings.archive, test.target(), exe_file)184 185 181 186 182 … … 219 215 def run_tests(tests, jobs) : 220 216 # clean the sandbox from previous commands 221 make('clean', output =subprocess.DEVNULL, error=subprocess.DEVNULL)217 make('clean', output_file=subprocess.DEVNULL, error=subprocess.DEVNULL) 222 218 223 219 # create the executor for our jobs and handle the signal properly … … 260 256 261 257 # clean the workspace 262 make('clean', output =subprocess.DEVNULL, error=subprocess.DEVNULL)258 make('clean', output_file=subprocess.DEVNULL, error=subprocess.DEVNULL) 263 259 264 260 return 1 if failed else 0 … … 299 295 # users may want to simply list the tests 300 296 if options.list_comp : 301 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected -- archive-errors --install --timeout --global-timeout -j --jobs ", end='')297 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --install --timeout --global-timeout -j --jobs ", end='') 302 298 print(" ".join(map(lambda t: "%s" % (t.target()), tests))) 303 299
Note:
See TracChangeset
for help on using the changeset viewer.