Changes in tests/Makefile.am [ee0bfa9:dcfedca]
- File:
-
- 1 edited
-
tests/Makefile.am (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
ree0bfa9 rdcfedca 24 24 archiveerrors= 25 25 26 INSTALL_FLAGS=-in-tree 26 27 DEBUG_FLAGS=-debug -O0 27 28 … … 34 35 35 36 # applies to both programs 36 # since automake doesn't have support for CFA we have to37 37 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 38 38 -g \ … … 42 42 -DIN_DIR="${abs_srcdir}/.in/" 43 43 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}) 44 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} 45 CC = @CFACC@ 56 46 57 47 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && … … 67 57 #---------------------------------------------------------------------------------------------------------------- 68 58 all-local : 69 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}59 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test} 70 60 71 61 all-tests : 72 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program62 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 73 63 74 64 clean-local : … … 97 87 98 88 # Use for all tests, make sure the path are correct and all flags are added 99 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g')) 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 ${@}) 100 96 101 97 #---------------------------------------------------------------------------------------------------------------- 102 98 103 99 # implicit rule so not all test require a rule 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 ${@}) 100 % : %.cfa $(CFACC) 101 $(CFATEST_STDOUT) 109 102 110 # implicit rule for c++ test111 # convient for testing the testsuite itself but not actuall used112 103 % : %.cpp 113 104 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 114 105 115 106 #------------------------------------------------------------------------------ 116 # TARGET S WITHCUSTOM FLAGS107 # TARGET WITH STANDARD RULE BUT CUSTOM FLAGS 117 108 #------------------------------------------------------------------------------ 118 # custom libs 119 gmp_FLAGSLD= -lgmp 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 120 117 121 118 #------------------------------------------------------------------------------ 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 ${@}) 119 # Expected failures 120 completeTypeError_FLAGS= -DERR1 131 121 132 122 #------------------------------------------------------------------------------ 133 123 # CUSTOM TARGET 134 124 #------------------------------------------------------------------------------ 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 ${@}) 125 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 126 $(CFATEST_STDOUT) -DERR1 139 127 140 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN)141 $(CFA COMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})128 alloc-ERROR: alloc.cfa $(CFACC) 129 $(CFATEST_STDOUT) -DERR1 142 130 143 nested-types-ERR1 : nested-types.cfa $(CFACCBIN)144 $(CFA COMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})131 nested-types-ERR1: nested-types.cfa $(CFACC) 132 $(CFATEST_STDOUT) -DERR1 145 133 146 nested-types-ERR2 : nested-types.cfa $(CFACCBIN)147 $(CFA COMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})134 nested-types-ERR2: nested-types.cfa $(CFACC) 135 $(CFATEST_STDOUT) -DERR2 148 136 149 raii/ memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN)150 $(CFA COMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})137 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC) 138 $(CFATEST_STDOUT) -DERR1 151 139 152 raii/ ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN)153 $(CFA COMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})140 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 141 $(CFATEST_STDOUT) -DERR2 154 142 155 raii/ dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN)156 $(CFA COMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})143 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 144 $(CFATEST_STDOUT) -DERR1 157 145 158 raii/ dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN)159 $(CFA COMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})146 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 147 $(CFATEST_STDOUT) -DERR1 160 148 161 #------------------------------------------------------------------------------ 162 # Other targets 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
Note:
See TracChangeset
for help on using the changeset viewer.