Changeset 3d5701e for tests/Makefile.am
- Timestamp:
- Feb 25, 2020, 1:17:33 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7dc2e015
- Parents:
- 9fb8f01 (diff), dd9e1ca (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
-
tests/Makefile.am (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
r9fb8f01 r3d5701e 24 24 archiveerrors= 25 25 26 INSTALL_FLAGS=-in-tree27 26 DEBUG_FLAGS=-debug -O0 28 27 … … 35 34 36 35 # applies to both programs 36 # since automake doesn't have support for CFA we have to 37 37 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 38 38 -g \ … … 42 42 -DIN_DIR="${abs_srcdir}/.in/" 43 43 44 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} 45 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 $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(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) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 46 56 47 57 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && … … 57 67 #---------------------------------------------------------------------------------------------------------------- 58 68 all-local : 59 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}69 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test} 60 70 61 71 all-tests : 62 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${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 63 73 64 74 clean-local : … … 87 97 88 98 # Use for all tests, make sure the path are correct and all flags are added 89 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g')) 90 91 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail 92 CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@}) 93 94 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr 95 CFATEST_STDERR=$(CFACOMPILETEST) 2> $(abspath ${@}) 99 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g')) 96 100 97 101 #---------------------------------------------------------------------------------------------------------------- 98 102 99 103 # implicit rule so not all test require a rule 100 % : %.cfa $(CFACC) 101 $(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 ${@}) 102 109 110 # implicit rule for c++ test 111 # convient for testing the testsuite itself but not actuall used 103 112 % : %.cpp 104 113 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 105 114 106 115 #------------------------------------------------------------------------------ 107 # TARGET WITH STANDARD RULE BUTCUSTOM FLAGS116 # TARGETS WITH CUSTOM FLAGS 108 117 #------------------------------------------------------------------------------ 109 # Expected failures 110 declarationSpecifier_FLAGS= -CFA -XCFA -p 111 gccExtensions_FLAGS= -CFA -XCFA -p 112 extension_FLAGS= -CFA -XCFA -p 113 attributes_FLAGS= -CFA -XCFA -p 114 functions_FLAGS= -CFA -XCFA -p 115 KRfunctions_FLAGS= -CFA -XCFA -p 116 gmp_FLAGS= -lgmp 118 # custom libs 119 gmp_FLAGSLD= -lgmp 117 120 118 121 #------------------------------------------------------------------------------ 119 # Expected failures 120 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 ${@}) 121 131 122 132 #------------------------------------------------------------------------------ 123 133 # CUSTOM TARGET 124 134 #------------------------------------------------------------------------------ 125 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 126 $(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 ${@}) 127 139 128 alloc-ERROR: alloc.cfa $(CFACC)129 $(CFA TEST_STDOUT) -DERR1140 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN) 141 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 130 142 131 nested-types-ERR1 : nested-types.cfa $(CFACC)132 $(CFA TEST_STDOUT) -DERR1143 nested-types-ERR1 : nested-types.cfa $(CFACCBIN) 144 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 133 145 134 nested-types-ERR2 : nested-types.cfa $(CFACC)135 $(CFA TEST_STDOUT) -DERR2146 nested-types-ERR2 : nested-types.cfa $(CFACCBIN) 147 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 136 148 137 raii/ dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)138 $(CFA TEST_STDOUT) -DERR1149 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN) 150 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 139 151 140 raii/ dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)141 $(CFA TEST_STDOUT) -DERR2152 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN) 153 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 142 154 143 raii/ memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)144 $(CFA TEST_STDOUT) -DERR1155 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN) 156 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 145 157 146 raii/ ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)147 $(CFA TEST_STDOUT) -DERR1158 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN) 159 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 148 160 149 #builtins 150 builtins/sync: builtins/sync.cfa $(CFACC) 151 $(CFATEST_STDERR) -fsyntax-only 152 153 # Warnings 154 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC) 155 $(CFATEST_STDERR) -fsyntax-only 161 #------------------------------------------------------------------------------ 162 # Other targets
Note:
See TracChangeset
for help on using the changeset viewer.