Changes in tests/Makefile.am [655c5fa:34e1494]
- File:
-
- 1 edited
-
tests/Makefile.am (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
r655c5fa r34e1494 35 35 36 36 # applies to both programs 37 # since automake doesn't have support for CFA we have to 37 38 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 38 39 -g \ … … 42 43 -DIN_DIR="${abs_srcdir}/.in/" 43 44 44 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} 45 CC = @CFACC@ 45 # adjust CC to current flags 46 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}) 47 CFACC = $(CC) 48 49 # get local binary for depedencies 50 CFACCBIN = @CFACC@ 51 52 # adjusted CC but without the actual distcc call 53 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}) 46 54 47 55 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && … … 57 65 #---------------------------------------------------------------------------------------------------------------- 58 66 all-local : 59 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}67 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test} 60 68 61 69 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 program70 @+${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 71 64 72 clean-local : … … 87 95 88 96 # 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 ${@}) 97 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g')) 96 98 97 99 #---------------------------------------------------------------------------------------------------------------- 98 100 99 101 # implicit rule so not all test require a rule 100 % : %.cfa $(CFACC) 101 $(CFATEST_STDOUT) 102 # split into two steps to support compiling remotely using distcc 103 # don't use distcc to do the linking because distcc doesn't do linking 104 % : %.cfa $(CFACCBIN) 105 $(CFACOMPILETEST) -c -o $(abspath ${@}).o 106 $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@}) 102 107 108 # implicit rule for c++ test 109 # convient for testing the testsuite itself but not actuall used 103 110 % : %.cpp 104 111 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 105 112 106 113 #------------------------------------------------------------------------------ 107 # TARGET WITH STANDARD RULE BUTCUSTOM FLAGS114 # TARGETS WITH CUSTOM FLAGS 108 115 #------------------------------------------------------------------------------ 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 116 # custom libs 117 gmp_FLAGSLD= -lgmp 117 118 118 119 #------------------------------------------------------------------------------ 119 # Expected failures 120 completeTypeError_FLAGS= -DERR1 120 # Generated code 121 GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions 122 $(GENERATED_CODE): % : %.cfa $(CFACCBIN) 123 $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@}) 124 125 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr 126 EXPECT_STDERR = builtins/sync warnings/self-assignment 127 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN) 128 $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@}) 121 129 122 130 #------------------------------------------------------------------------------ 123 131 # CUSTOM TARGET 124 132 #------------------------------------------------------------------------------ 125 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 126 $(CFATEST_STDOUT) -DERR1 133 # expected failures 134 # use custom target since they require a custom define and custom dependencies 135 alloc-ERROR : alloc.cfa $(CFACCBIN) 136 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 127 137 128 alloc-ERROR: alloc.cfa $(CFACC)129 $(CFA TEST_STDOUT) -DERR1138 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN) 139 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 130 140 131 nested-types-ERR1 : nested-types.cfa $(CFACC)132 $(CFA TEST_STDOUT) -DERR1141 nested-types-ERR1 : nested-types.cfa $(CFACCBIN) 142 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 133 143 134 nested-types-ERR2 : nested-types.cfa $(CFACC)135 $(CFA TEST_STDOUT) -DERR2144 nested-types-ERR2 : nested-types.cfa $(CFACCBIN) 145 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 136 146 137 raii/ dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)138 $(CFA TEST_STDOUT) -DERR1147 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN) 148 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 139 149 140 raii/ dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)141 $(CFA TEST_STDOUT) -DERR2150 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN) 151 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 142 152 143 raii/ memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)144 $(CFA TEST_STDOUT) -DERR1153 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN) 154 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 145 155 146 raii/ ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)147 $(CFA TEST_STDOUT) -DERR1156 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN) 157 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 148 158 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 159 #------------------------------------------------------------------------------ 160 # Other targets
Note:
See TracChangeset
for help on using the changeset viewer.