Changeset 4a60488 for tests/Makefile.am
- Timestamp:
- Sep 27, 2019, 3:35:46 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 90ce35aa
- Parents:
- 8e1467d (diff), 849720f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
r8e1467d r4a60488 22 22 debug=yes 23 23 installed=no 24 archiveerrors= 24 25 25 INSTALL_FLAGS=-in-tree26 26 DEBUG_FLAGS=-debug -O0 27 27 … … 34 34 35 35 # applies to both programs 36 # since automake doesn't have support for CFA we have to 36 37 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 37 38 -g \ … … 41 42 -DIN_DIR="${abs_srcdir}/.in/" 42 43 43 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} 44 CC = @CFACC@ 44 # get the desired cfa to test 45 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@) 46 47 # adjust CC to current flags 48 CC = $(if $(ifeq $(DISTCC_CFA_PATH),yes),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 49 CFACC = $(CC) 50 51 # get local binary for depedencies 52 CFACCBIN = @CFACC@ 53 54 # adjusted CC but without the actual distcc call 55 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 45 56 46 57 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && … … 56 67 #---------------------------------------------------------------------------------------------------------------- 57 68 all-local : 58 @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test}69 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test} 59 70 60 71 all-tests : 61 @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program72 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 62 73 63 74 clean-local : … … 86 97 87 98 # Use for all tests, make sure the path are correct and all flags are added 88 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g')) 89 90 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail 91 CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@}) 92 93 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr 94 CFATEST_STDERR=$(CFACOMPILETEST) 2> $(abspath ${@}) 99 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g')) 95 100 96 101 #---------------------------------------------------------------------------------------------------------------- 97 102 98 103 # implicit rule so not all test require a rule 99 % : %.cfa $(CFACC) 100 $(CFATEST_STDOUT) 104 # split into two steps to support compiling remotely using distcc 105 # don't use distcc to do the linking because distcc doesn't do linking 106 % : %.cfa $(CFACCBIN) 107 $(CFACOMPILETEST) -c -o $(abspath ${@}).o 108 $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@}) 101 109 110 # implicit rule for c++ test 111 # convient for testing the testsuite itself but not actuall used 102 112 % : %.cpp 103 113 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 104 114 105 115 #------------------------------------------------------------------------------ 106 # TARGET WITH STANDARD RULE BUTCUSTOM FLAGS116 # TARGETS WITH CUSTOM FLAGS 107 117 #------------------------------------------------------------------------------ 108 # Expected failures 109 declarationSpecifier_FLAGS= -CFA -XCFA -p 110 gccExtensions_FLAGS= -CFA -XCFA -p 111 extension_FLAGS= -CFA -XCFA -p 112 attributes_FLAGS= -CFA -XCFA -p 113 functions_FLAGS= -CFA -XCFA -p 114 KRfunctions_FLAGS= -CFA -XCFA -p 115 gmp_FLAGS= -lgmp 118 # custom libs 119 gmp_FLAGSLD= -lgmp 116 120 117 121 #------------------------------------------------------------------------------ 118 # Expected failures 119 completeTypeError_FLAGS= -DERR1 122 # Generated code 123 GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions 124 $(GENERATED_CODE): % : %.cfa $(CFACCBIN) 125 $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@}) 126 127 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr 128 EXPECT_STDERR = builtins/sync warnings/self-assignment 129 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN) 130 $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@}) 120 131 121 132 #------------------------------------------------------------------------------ 122 133 # CUSTOM TARGET 123 134 #------------------------------------------------------------------------------ 124 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 125 $(CFATEST_STDOUT) -DERR1 135 # expected failures 136 # use custom target since they require a custom define and custom dependencies 137 alloc-ERROR : alloc.cfa $(CFACCBIN) 138 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 126 139 127 alloc-ERROR: alloc.cfa $(CFACC)128 $(CFA TEST_STDOUT) -DERR1140 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN) 141 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 129 142 130 nested-types-ERR1 : nested-types.cfa $(CFACC)131 $(CFA TEST_STDOUT) -DERR1143 nested-types-ERR1 : nested-types.cfa $(CFACCBIN) 144 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 132 145 133 nested-types-ERR2 : nested-types.cfa $(CFACC)134 $(CFA TEST_STDOUT) -DERR2146 nested-types-ERR2 : nested-types.cfa $(CFACCBIN) 147 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 135 148 136 raii/ dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)137 $(CFA TEST_STDOUT) -DERR1149 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN) 150 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 138 151 139 raii/ dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)140 $(CFA TEST_STDOUT) -DERR2152 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN) 153 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 141 154 142 raii/ memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)143 $(CFA TEST_STDOUT) -DERR1155 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN) 156 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 144 157 145 raii/ ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)146 $(CFA TEST_STDOUT) -DERR1158 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN) 159 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 147 160 148 #builtins 149 builtins/sync: builtins/sync.cfa $(CFACC) 150 $(CFATEST_STDERR) -fsyntax-only 151 152 # Warnings 153 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC) 154 $(CFATEST_STDERR) -fsyntax-only 161 #------------------------------------------------------------------------------ 162 # Other targets
Note:
See TracChangeset
for help on using the changeset viewer.