Ignore:
Timestamp:
Nov 3, 2020, 5:29:45 PM (13 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
a3f5208a
Parents:
daefe93
Message:

Finished support for running tests for new and old ast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/settings.py

    rdaefe93 ra2f2fda  
    8585        def filter(self, tests):
    8686                return [test for test in tests if not test.arch or self.target == test.arch]
    87                 return True if not arch else self.target == arch
    8887
    8988        @staticmethod
     
    101100        def __init__(self, ast):
    102101                if ast == "new":
     102                        self.target = ast
    103103                        self.string = "New AST"
    104104                        self.flags  = """AST_FLAGS=-XCFA,--new-ast"""
    105105                elif ast == "old":
     106                        self.target = ast
    106107                        self.string = "Old AST"
    107108                        self.flags  = """AST_FLAGS=-XCFA,--old-ast"""
    108109                elif ast == None:
    109                         self.string = "Default AST (%s)" % ("new" if config.NEWAST else "old")
     110                        self.target = "new" if config.NEWAST else "old"
     111                        self.string = "Default AST (%s)" % self.target
    110112                        self.flags  = """AST_FLAGS="""
    111113                else:
    112114                        print("""ERROR: Invalid ast configuration, must be "old", "new" or left unspecified, was %s""" % (value), file=sys.stderr)
     115                        sys.exit(1)
     116
     117        def filter(self, tests):
     118
     119                return [test for test in tests if not test.astv or self.target == test.astv]
    113120
    114121class Install:
Note: See TracChangeset for help on using the changeset viewer.