- Timestamp:
- Aug 9, 2018, 11:07:05 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 7a7ab42
- Parents:
- a5121bf
- Location:
- tests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
ra5121bf r575a6e5 33 33 -DIN_DIR="${srcdir}/.in/" 34 34 35 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} 35 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} 36 36 37 37 CC = @CFACC@ … … 59 59 60 60 .validate: .validate.c 61 @$(COMPILE) .validate.c -fsyntax-only61 $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror 62 62 63 63 .validate.c: -
tests/Makefile.in
ra5121bf r575a6e5 304 304 AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \ 305 305 -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" ${DEBUG_FLAGS} \ 306 ${INSTALL_FLAGS} 306 ${INSTALL_FLAGS} ${ARCH_FLAGS} 307 307 fstream_test_SOURCES = fstream_test.c 308 308 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c … … 625 625 626 626 .validate: .validate.c 627 @$(COMPILE) .validate.c -fsyntax-only627 $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror 628 628 629 629 .validate.c: -
tests/pybin/settings.py
ra5121bf r575a6e5 29 29 } 30 30 31 CrossCompileFlags = { 32 'x64' : 'ARCH_FLAGS=-m64', 33 'x86' : 'ARCH_FLAGS=-m32', 34 } 35 31 36 def __init__(self, arch): 37 try: 38 canonical_host = Architecture.makeCanonical( config.HOSTARCH ) 39 except KeyError: 40 print("Unkown host architecture %s" % config.HOSTARCH, file=sys.stderr) 41 sys.exit(1) 42 32 43 if arch: 44 try: 45 arch = Architecture.makeCanonical( arch ) 46 except KeyError: 47 print("Unkown architecture %s" % arch, file=sys.stderr) 48 sys.exit(1) 49 50 if arch and arch != canonical_host: 51 self.target = arch 33 52 self.cross_compile = True 34 try :35 self. target = Architecture.makeCanonical( arch )53 try : 54 self.flags = Architecture.CrossCompileFlags[arch] 36 55 except KeyError: 37 print(" Unkown architecture %s" % arch)56 print("Cross compilation not available for architecture %s" % arch, file=sys.stderr) 38 57 sys.exit(1) 58 39 59 else: 60 self.target = canonical_host 40 61 self.cross_compile = False 41 try: 42 arch = config.HOSTARCH 43 self.target = Architecture.makeCanonical( arch ) 44 except KeyError: 45 print("Running on unkown architecture %s" % arch) 46 sys.exit(1) 62 self.flags = "" 47 63 48 64 self.string = self.target … … 65 81 def __init__(self, value): 66 82 self.string = "debug" if value else "no debug" 67 self.flags = """DEBUG_FLAGS="%s" """ % ("-debug " if value else "-nodebug")83 self.flags = """DEBUG_FLAGS="%s" """ % ("-debug -O0" if value else "-nodebug -O2") 68 84 69 85 class Install: … … 98 114 with open (".validate.err", "r") as myfile: 99 115 error=myfile.read() 100 print( 'ERROR: Invalid configuration', file=sys.stderr)116 print("ERROR: Invalid configuration %s:%s" % (arch.string, debug.string), file=sys.stderr) 101 117 print(" verify returned : \n%s" % error, file=sys.stderr) 102 118 tools.rm("%s/.validate.err" % BUILDDIR) -
tests/pybin/tools.py
ra5121bf r575a6e5 101 101 '-s' if silent else '', 102 102 test_param, 103 settings.arch.flags, 103 104 settings.debug.flags, 104 105 settings.install.flags, -
tests/test.py
ra5121bf r575a6e5 98 98 parser.add_argument('tests', metavar='test', type=str, nargs='*', help='a list of tests to run') 99 99 100 options = parser.parse_args() 100 try: 101 options = parser.parse_args() 102 except: 103 print('ERROR: invalid arguments', file=sys.stderr) 104 parser.print_help(sys.stderr) 105 sys.exit(1) 101 106 102 107 # script must have at least some tests to run or be listing
Note: See TracChangeset
for help on using the changeset viewer.