Changeset 99581ee for tests/pybin


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

Location:
tests/pybin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/settings.py

    r969e7ee7 r99581ee  
    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

    r969e7ee7 r99581ee  
    181181                '-s' if silent else None,
    182182                test_param,
     183                settings.ast.flags,
    183184                settings.arch.flags,
    184185                settings.debug.flags,
Note: See TracChangeset for help on using the changeset viewer.