Changeset 99581ee for tests/test.py


Ignore:
Timestamp:
Oct 30, 2020, 12:29:39 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
0ab3b73
Parents:
969e7ee7
Message:

Tests now support the --ast flag, Makefile still doesn't

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test.py

    r969e7ee7 r99581ee  
    112112        # create a parser with the arguments for the tests script
    113113        parser = argparse.ArgumentParser(description='Script which runs cforall tests')
     114        parser.add_argument('--ast', help='Test for specific ast', type=comma_separated(str), default=None)
     115        parser.add_argument('--arch', help='Test for specific architecture', type=comma_separated(str), default=None)
    114116        parser.add_argument('--debug', help='Run all tests in debug or release', type=comma_separated(yes_no), default='yes')
    115117        parser.add_argument('--install', help='Run all tests based on installed binaries or tree binaries', type=comma_separated(yes_no), default='no')
    116         parser.add_argument('--arch', help='Test for specific architecture', type=comma_separated(str), default=None)
    117118        parser.add_argument('--continue', help='When multiple specifications are passed (debug/install/arch), sets whether or not to continue if the last specification failed', type=yes_no, default='yes', dest='continue_')
    118119        parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default=120)
     
    362363                # for each build configurations, run the test
    363364                with Timed() as total_dur:
    364                         for arch, debug, install in itertools.product(settings.all_arch, settings.all_debug, settings.all_install):
     365                        for ast, arch, debug, install in itertools.product(settings.all_ast, settings.all_arch, settings.all_debug, settings.all_install):
     366                                settings.ast     = ast
    365367                                settings.arch    = arch
    366368                                settings.debug   = debug
     
    377379
    378380                                # print configuration
    379                                 print('%s %i tests on %i cores (%s:%s)' % (
     381                                print('%s %i tests on %i cores (%s:%s - %s)' % (
    380382                                        'Regenerating' if settings.generating else 'Running',
    381383                                        len(local_tests),
    382384                                        options.jobs,
    383385                                        settings.arch.string,
    384                                         settings.debug.string
     386                                        settings.debug.string,
     387                                        settings.ast.string
    385388                                ))
    386389
Note: See TracChangeset for help on using the changeset viewer.