Changeset 2980667
- Timestamp:
- Mar 26, 2020, 2:34:41 PM (5 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:
- 136f86b
- Parents:
- 2a35f14
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/test.py
r2a35f14 r2980667 293 293 settings.init( options ) 294 294 295 # fetch the liest of all valid tests296 all_tests = list_tests( options.include, options.exclude )297 298 299 # if user wants all tests than no other treatement of the test list is required300 if options.all or options.list or options.list_comp or options.include :301 tests = all_tests302 303 #otherwise we need to validate that the test list that was entered is valid304 else :305 tests = valid_tests( options )306 307 # make sure we have at least some test to run308 if not tests :309 print('ERROR: No valid test to run', file=sys.stderr)310 sys.exit(1)311 312 313 # sort the test alphabetically for convenience314 tests.sort(key=lambda t: (t.arch if t.arch else '') + t.target())315 316 295 # users may want to simply list the tests 317 296 if options.list_comp : 297 # fetch the liest of all valid tests 298 tests = list_tests( None, None ) 299 300 # sort the test alphabetically for convenience 301 tests.sort(key=lambda t: (t.arch if t.arch else '') + t.target()) 302 303 # print the possible options 318 304 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --archive-errors --install --timeout --global-timeout --timeout-with-gdb -j --jobs ", end='') 319 305 print(" ".join(map(lambda t: "%s" % (t.target()), tests))) 320 306 321 307 elif options.list : 308 # fetch the liest of all valid tests 309 tests = list_tests( options.include, options.exclude ) 310 311 # sort the test alphabetically for convenience 312 tests.sort(key=lambda t: (t.arch if t.arch else '') + t.target()) 313 314 # print the available tests 322 315 print("Listing for %s:%s"% (settings.arch.string, settings.debug.string)) 323 316 fancy_print("\n".join(map(lambda t: t.toString(), tests))) 324 317 325 318 else : 319 # fetch the liest of all valid tests 320 all_tests = list_tests( options.include, options.exclude ) 321 322 # if user wants all tests than no other treatement of the test list is required 323 if options.all or options.include : 324 tests = all_tests 325 326 #otherwise we need to validate that the test list that was entered is valid 327 else : 328 tests = valid_tests( options ) 329 330 # make sure we have at least some test to run 331 if not tests : 332 print('ERROR: No valid test to run', file=sys.stderr) 333 sys.exit(1) 334 335 # sort the test alphabetically for convenience 336 tests.sort(key=lambda t: (t.arch if t.arch else '') + t.target()) 337 326 338 # check the build configuration works 327 339 settings.prep_output(tests)
Note: See TracChangeset
for help on using the changeset viewer.