Changes in / [0ab3b73:f7e4f8e8]
- Files:
-
- 5 edited
-
configure.ac (modified) (1 diff)
-
tests/config.py.in (modified) (1 diff)
-
tests/pybin/settings.py (modified) (3 diffs)
-
tests/pybin/tools.py (modified) (1 diff)
-
tests/test.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r0ab3b73 rf7e4f8e8 28 28 # New AST toggling support 29 29 AH_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]) 30 DEFAULT_NEW_AST="False"31 30 AC_ARG_ENABLE(new-ast, 32 31 [ --enable-new-ast whether or not to use new ast as the default AST algorithm], 33 32 [case "${enableval}" in 34 yes) newast=true ; DEFAULT_NEW_AST="True" ;;35 no) newast=false ; DEFAULT_NEW_AST="False";;33 yes) newast=true ;; 34 no) newast=false ;; 36 35 *) AC_MSG_ERROR([bad value ${enableval} for --enable-new-ast]) ;; 37 36 esac],[newast=false]) 38 37 AC_DEFINE_UNQUOTED([CFA_USE_NEW_AST], $newast) 39 AC_SUBST(DEFAULT_NEW_AST)40 38 41 39 #============================================================================== -
tests/config.py.in
r0ab3b73 rf7e4f8e8 9 9 HOSTARCH = "@host_cpu@" 10 10 DISTRIBUTE = @HAS_DISTCC@ 11 NEWAST = @DEFAULT_NEW_AST@ -
tests/pybin/settings.py
r0ab3b73 rf7e4f8e8 98 98 self.path = "debug" if value else "nodebug" 99 99 100 class 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 114 100 class Install: 115 101 def __init__(self, value): … … 134 120 135 121 def init( options ): 136 global all_ast137 122 global all_arch 138 123 global all_debug 139 124 global all_install 140 global ast141 125 global arch 126 global archive 127 global continue_ 142 128 global debug 143 global archive144 global install145 146 global continue_147 129 global dry_run 148 130 global generating 131 global install 149 132 global make 150 133 global output_width … … 152 135 global timeout2gdb 153 136 154 all_ast = [AST(o) for o in list(dict.fromkeys(options.ast ))] if options.ast else [AST(None)]155 137 all_arch = [Architecture(o) for o in list(dict.fromkeys(options.arch ))] if options.arch else [Architecture(None)] 156 138 all_debug = [Debug(o) for o in list(dict.fromkeys(options.debug ))] -
tests/pybin/tools.py
r0ab3b73 rf7e4f8e8 181 181 '-s' if silent else None, 182 182 test_param, 183 settings.ast.flags,184 183 settings.arch.flags, 185 184 settings.debug.flags, -
tests/test.py
r0ab3b73 rf7e4f8e8 112 112 # create a parser with the arguments for the tests script 113 113 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)116 114 parser.add_argument('--debug', help='Run all tests in debug or release', type=comma_separated(yes_no), default='yes') 117 115 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) 118 117 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_') 119 118 parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default=120) … … 363 362 # for each build configurations, run the test 364 363 with Timed() as total_dur: 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 364 for arch, debug, install in itertools.product(settings.all_arch, settings.all_debug, settings.all_install): 367 365 settings.arch = arch 368 366 settings.debug = debug … … 379 377 380 378 # print configuration 381 print('%s %i tests on %i cores (%s:%s - %s)' % (379 print('%s %i tests on %i cores (%s:%s)' % ( 382 380 'Regenerating' if settings.generating else 'Running', 383 381 len(local_tests), 384 382 options.jobs, 385 383 settings.arch.string, 386 settings.debug.string, 387 settings.ast.string 384 settings.debug.string 388 385 )) 389 386
Note:
See TracChangeset
for help on using the changeset viewer.