Changeset dcfedca for tests/test.py


Ignore:
Timestamp:
Aug 13, 2019, 4:38:27 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
3221a2b
Parents:
1118b8b
Message:

Test script can now archive errors (copy executables and core dumps to a specified directory)
run --help command for detail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test.py

    r1118b8b rdcfedca  
    9191        parser.add_argument('--all', help='Run all test available', action='store_true')
    9292        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='')
    9394        parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int)
    9495        parser.add_argument('--list-comp', help='List all valide arguments', action='store_true')
     
    179180                        error = error + info if error else info
    180181
     182                        if settings.archive:
     183                                error = error + '\n' + core_archive(settings.archive, test.target(), exe_file)
     184
    181185
    182186
     
    295299        # users may want to simply list the tests
    296300        if options.list_comp :
    297                 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --install --timeout --global-timeout -j --jobs ", end='')
     301                print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --archive-errors --install --timeout --global-timeout -j --jobs ", end='')
    298302                print(" ".join(map(lambda t: "%s" % (t.target()), tests)))
    299303
Note: See TracChangeset for help on using the changeset viewer.