Changes in / [f7e4f8e8:0ab3b73]


Ignore:
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    rf7e4f8e8 r0ab3b73  
    2828# New AST toggling support
    2929AH_TEMPLATE([CFA_USE_NEW_AST],[Sets whether or not to use the new-ast, this is adefault value and can be overrided by --old-ast and --new-ast])
     30DEFAULT_NEW_AST="False"
    3031AC_ARG_ENABLE(new-ast,
    3132        [  --enable-new-ast     whether or not to use new ast as the default AST algorithm],
    3233        [case "${enableval}" in
    33                 yes) newast=true ;;
    34                 no)  newast=false ;;
     34                yes) newast=true ; DEFAULT_NEW_AST="True"  ;;
     35                no)  newast=false; DEFAULT_NEW_AST="False" ;;
    3536                *) AC_MSG_ERROR([bad value ${enableval} for --enable-new-ast]) ;;
    3637        esac],[newast=false])
    3738AC_DEFINE_UNQUOTED([CFA_USE_NEW_AST], $newast)
     39AC_SUBST(DEFAULT_NEW_AST)
    3840
    3941#==============================================================================
  • tests/config.py.in

    rf7e4f8e8 r0ab3b73  
    99HOSTARCH = "@host_cpu@"
    1010DISTRIBUTE = @HAS_DISTCC@
     11NEWAST = @DEFAULT_NEW_AST@
  • tests/pybin/settings.py

    rf7e4f8e8 r0ab3b73  
    9898                self.path   = "debug" if value else "nodebug"
    9999
     100class AST:
     101        def __init__(self, ast):
     102                if ast == "new":
     103                        self.string = "New AST"
     104                        self.flags  = """AST_FLAGS=-XCFA,--new-ast"""
     105                elif ast == "old":
     106                        self.string = "Old AST"
     107                        self.flags  = """AST_FLAGS=-XCFA,--old-ast"""
     108                elif ast == None:
     109                        self.string = "Default AST (%s)" % ("new" if config.NEWAST else "old")
     110                        self.flags  = """AST_FLAGS="""
     111                else:
     112                        print("""ERROR: Invalid ast configuration, must be "old", "new" or left unspecified, was %s""" % (value), file=sys.stderr)
     113
    100114class Install:
    101115        def __init__(self, value):
     
    120134
    121135def init( options ):
     136        global all_ast
    122137        global all_arch
    123138        global all_debug
    124139        global all_install
     140        global ast
    125141        global arch
     142        global debug
    126143        global archive
     144        global install
     145
    127146        global continue_
    128         global debug
    129147        global dry_run
    130148        global generating
    131         global install
    132149        global make
    133150        global output_width
     
    135152        global timeout2gdb
    136153
     154        all_ast      = [AST(o)          for o in list(dict.fromkeys(options.ast    ))] if options.ast  else [AST(None)]
    137155        all_arch     = [Architecture(o) for o in list(dict.fromkeys(options.arch   ))] if options.arch else [Architecture(None)]
    138156        all_debug    = [Debug(o)        for o in list(dict.fromkeys(options.debug  ))]
  • tests/pybin/tools.py

    rf7e4f8e8 r0ab3b73  
    181181                '-s' if silent else None,
    182182                test_param,
     183                settings.ast.flags,
    183184                settings.arch.flags,
    184185                settings.debug.flags,
  • tests/test.py

    rf7e4f8e8 r0ab3b73  
    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.