Changeset afe8882 for tests/test.py
- Timestamp:
- Aug 15, 2018, 3:51:12 PM (6 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- bdff89d
- Parents:
- 7bd4cc9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/test.py
r7bd4cc9 rafe8882 88 88 parser.add_argument('--install', help='Run all tests based on installed binaries or tree binaries', type=yes_no, default='no') 89 89 parser.add_argument('--arch', help='Test for specific architecture', type=str, default='') 90 parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default=60) 91 parser.add_argument('--global-timeout', help='Maximum cumulative duration in seconds after the ALL tests are considered to have timed out', type=int, default=7200) 90 92 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 91 93 parser.add_argument('--list', help='List all test available', action='store_true') … … 160 162 if settings.dry_run or fileIsExecutable(exe_file) : 161 163 # run test 162 retcode, _ = sh("timeout 60 %s > %s 2>&1" % (exe_file, out_file), input = in_file)164 retcode, _ = sh("timeout %d %s > %s 2>&1" % (settings.timeout.single, exe_file, out_file), input = in_file) 163 165 else : 164 166 # simply cat the result into the output … … 234 236 tests, 235 237 chunksize = 1 236 ).get( 7200)238 ).get(settings.timeout.total) 237 239 except KeyboardInterrupt: 238 240 pool.terminate() … … 283 285 # users may want to simply list the tests 284 286 if options.list_comp : 285 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected - j --jobs ", end='')287 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --install --timeout --global-timeout -j --jobs ", end='') 286 288 print(" ".join(map(lambda t: "%s" % (t.target()), tests))) 287 289
Note: See TracChangeset
for help on using the changeset viewer.