Changes in tests/Makefile.am [386fb57:a1b41e3]
- File:
-
- 1 edited
-
tests/Makefile.am (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
r386fb57 ra1b41e3 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Mon May 1 17:25:24202314 ## Update Count : 14513 ## Last Modified On : Mon Apr 10 23:24:02 2023 14 ## Update Count : 96 15 15 ############################################################################### 16 17 # user targets:18 # Run the complete test suite.19 # $ make / tests [debug=yes/no] [installed=yes/no] [arch=x86/x64/arm]20 #21 # Run the short (quick) test suite.22 # $ make quick [debug=yes/no] [installed=yes/no] [arch=x86/x64/arm]23 16 24 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names … … 27 20 include $(top_srcdir)/tools/build/cfa.make 28 21 29 DEFAULT_INCLUDES = -I$(abs_srcdir) 30 31 debug ?= yes 32 installed ?= no 33 ARCH=$(if $(arch),"--arch=$(arch)") 22 DEFAULT_INCLUDES = -I${abs_srcdir} 23 24 debug=yes 25 installed=no 34 26 archiveerrors= 35 27 … … 41 33 timeouts= 42 34 43 TEST_PY = python3 $ (builddir)/test.py35 TEST_PY = python3 ${builddir}/test.py 44 36 45 37 # applies to both programs 46 38 # since automake doesn't have support for CFA we have to 47 39 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 48 -fdebug-prefix-map=$(abspath $ (abs_srcdir))= \40 -fdebug-prefix-map=$(abspath ${abs_srcdir})= \ 49 41 -fdebug-prefix-map=/tmp= \ 50 42 -fno-diagnostics-show-caret \ … … 62 54 63 55 # adjust CC to current flags 64 CC = LC_ALL=C $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) $ (ARCH_FLAGS) ,$(TARGET_CFA) $(DEBUG_FLAGS) $(ARCH_FLAGS))56 CC = LC_ALL=C $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS} ,$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 65 57 CFACC = $(CC) 66 58 … … 69 61 70 62 # adjusted CC but without the actual distcc call 71 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) $ (ARCH_FLAGS) ,$(TARGET_CFA) $(DEBUG_FLAGS) $(ARCH_FLAGS))72 CFACCLINK = $(CFACCLOCAL) -quiet $(if $(test), 2> $(test), ) $($(shell echo "$ (@)_FLAGSLD" | sed 's/-\|\//_/g'))73 74 PRETTY_PATH=mkdir -p $(dir $(abspath $ (@))) && cd $(srcdir)&&63 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS} ,$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 64 CFACCLINK = $(CFACCLOCAL) -quiet $(if $(test), 2> $(test), ) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) 65 66 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && 75 67 76 68 .PHONY: list .validate .test_makeflags … … 101 93 dist-hook: 102 94 echo "Gathering test files" 103 for file in `$ (TEST_PY)--list-dist`; do \104 if test -f $ (srcdir)/$${file}; then \105 $(MKDIR_P) $$(dirname $ (distdir)/$${file}); \106 cp -df $ (srcdir)/$${file} $(distdir)/$${file}; \95 for file in `${TEST_PY} --list-dist`; do \ 96 if test -f ${srcdir}/$${file}; then \ 97 $(MKDIR_P) $$(dirname ${distdir}/$${file}); \ 98 cp -df ${srcdir}/$${file} ${distdir}/$${file}; \ 107 99 fi; \ 108 100 done 109 110 101 111 102 avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa … … 116 107 117 108 #---------------------------------------------------------------------------------------------------------------- 118 119 all-local : # This name is important to automake and implies the default build target. 120 @+$(TEST_PY) --debug=$(debug) --install=$(installed) --invariant --archive-errors=$(archiveerrors) $(concurrent) $(timeouts) $(ARCH) --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 121 122 install : all-local # PAB only 123 124 tests : all-local 125 126 quick : 127 @+$(TEST_PY) --debug=$(debug) --install=$(installed) --archive-errors=$(archiveerrors) $(concurrent) $(timeouts) $(ARCH) $(quick_test) 109 all-local : 110 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test} 111 112 all-tests : 113 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 128 114 129 115 mostlyclean-local : 130 find $ (builddir)-not -path './__pycache__/*' -path '*.o' -delete131 find $ (builddir)-not -path './__pycache__/*' -path '*/.err/*.log' -delete132 find $ (builddir)-not -path './__pycache__/*' -path '*/.out/*.log' -delete133 rm -f $ (EXTRA_PROGRAMS)116 find ${builddir} -not -path './__pycache__/*' -path '*.o' -delete 117 find ${builddir} -not -path './__pycache__/*' -path '*/.err/*.log' -delete 118 find ${builddir} -not -path './__pycache__/*' -path '*/.out/*.log' -delete 119 rm -f ${EXTRA_PROGRAMS} 134 120 rm -rf __pycache__ 135 121 136 122 distclean-local : 137 find $ (builddir)-path '*.Po' -delete123 find ${builddir} -path '*.Po' -delete 138 124 139 125 list : 140 @+$ (TEST_PY) --list $(concurrent)126 @+${TEST_PY} --list ${concurrent} 141 127 142 128 .test_makeflags: 143 @echo "$ (MAKEFLAGS)"129 @echo "${MAKEFLAGS}" 144 130 145 131 .validate: .validate.cfa … … 147 133 148 134 .validate.cfa: 149 @echo "int main() { return 0; }" > $ (@)135 @echo "int main() { return 0; }" > ${@} 150 136 151 137 # automake doesn't know we still need C rules so pretend like we have a C program 152 138 .dummy_hack.c: 153 @echo "int main() { return 0; }" > $ (@)139 @echo "int main() { return 0; }" > ${@} 154 140 155 141 .dummy_hackxx.cpp: 156 @echo "int bar() { return 0; }" > $ (@)142 @echo "int bar() { return 0; }" > ${@} 157 143 158 144 concurrency : 159 @+$ (TEST_PY) --debug=$(debug) --install=$(installed)-Iconcurrent145 @+${TEST_PY} --debug=${debug} --install=${installed} -Iconcurrent 160 146 161 147 #---------------------------------------------------------------------------------------------------------------- 162 148 163 149 # Use for all tests, make sure the path are correct and all flags are added 164 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=$ (srcdir) $(<)) $($(shell echo "$(@)_FLAGSCFA" | sed 's/-\|\//_/g'))150 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g')) 165 151 166 152 #---------------------------------------------------------------------------------------------------------------- … … 170 156 # don't use distcc to do the linking because distcc doesn't do linking 171 157 % : %.cfa $(CFACCBIN) 172 $(CFACOMPILETEST) -c -o $(abspath $ (@)).o -DIN_DIR="$(abspath $(dir $(<)))/.in/"173 $(CFACCLINK) $ (@).o -o $(abspath $(@))174 rm $(abspath $ (@)).o158 $(CFACOMPILETEST) -c -o $(abspath ${@}).o -DIN_DIR="$(abspath $(dir ${<}))/.in/" 159 $(CFACCLINK) ${@}.o -o $(abspath ${@}) 160 rm $(abspath ${@}).o 175 161 176 162 # implicit rule for c++ test 177 163 # convient for testing the testsuite itself but not actuall used 178 164 % : %.cpp 179 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=$ (srcdir) $(<)) -o $(abspath $(@))165 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 180 166 181 167 #------------------------------------------------------------------------------ … … 189 175 GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions 190 176 $(GENERATED_CODE): % : %.cfa $(CFACCBIN) 191 $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath $ (@))177 $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@}) 192 178 193 179 #------------------------------------------------------------------------------ … … 195 181 #------------------------------------------------------------------------------ 196 182 # tests that just validate syntax and compiler output should be compared to stderr 197 CFACOMPILE_SYNTAX = $(CFACOMPILETEST) -Wno-unused-variable -Wno-unused-label -c -fsyntax-only -o $(abspath $ (@))183 CFACOMPILE_SYNTAX = $(CFACOMPILETEST) -Wno-unused-variable -Wno-unused-label -c -fsyntax-only -o $(abspath ${@}) 198 184 199 185 SYNTAX_ONLY_CODE = expression typedefRedef variableDeclarator switch numericConstants identFuncDeclarator \ … … 201 187 $(SYNTAX_ONLY_CODE): % : %.cfa $(CFACCBIN) 202 188 $(CFACOMPILE_SYNTAX) 203 $(if $(test), cp $(test) $(abspath $ (@)), )189 $(if $(test), cp $(test) $(abspath ${@}), ) 204 190 205 191 # expected failures … … 207 193 alloc-ERROR : alloc.cfa $(CFACCBIN) 208 194 $(CFACOMPILE_SYNTAX) -DERR1 209 -cp $(test) $(abspath $ (@))195 -cp $(test) $(abspath ${@}) 210 196 211 197 init1-ERROR : init1.cfa $(CFACCBIN) 212 198 $(CFACOMPILE_SYNTAX) -DERR1 213 -cp $(test) $(abspath $ (@))199 -cp $(test) $(abspath ${@}) 214 200 215 201 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN) 216 202 $(CFACOMPILE_SYNTAX) -DERR1 217 -cp $(test) $(abspath $ (@))203 -cp $(test) $(abspath ${@}) 218 204 219 205 nested-types-ERR1 : nested-types.cfa $(CFACCBIN) 220 206 $(CFACOMPILE_SYNTAX) -DERR1 221 -cp $(test) $(abspath $ (@))207 -cp $(test) $(abspath ${@}) 222 208 223 209 nested-types-ERR2 : nested-types.cfa $(CFACCBIN) 224 210 $(CFACOMPILE_SYNTAX) -DERR2 225 -cp $(test) $(abspath $ (@))211 -cp $(test) $(abspath ${@}) 226 212 227 213 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN) 228 214 $(CFACOMPILE_SYNTAX) -DERR1 229 -cp $(test) $(abspath $ (@))215 -cp $(test) $(abspath ${@}) 230 216 231 217 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN) 232 218 $(CFACOMPILE_SYNTAX) -DERR1 233 -cp $(test) $(abspath $ (@))219 -cp $(test) $(abspath ${@}) 234 220 235 221 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN) 236 222 $(CFACOMPILE_SYNTAX) -DERR1 237 -cp $(test) $(abspath $ (@))223 -cp $(test) $(abspath ${@}) 238 224 239 225 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN) 240 226 $(CFACOMPILE_SYNTAX) -DERR2 241 -cp $(test) $(abspath $ (@))227 -cp $(test) $(abspath ${@}) 242 228 243 229 # Exception Tests … … 245 231 246 232 exceptions/%-threads : exceptions/%.cfa $(CFACCBIN) 247 $(CFACOMPILETEST) -include exceptions/with-threads.hfa -c -o $(abspath $ (@)).o248 $(CFACCLOCAL) $($(shell echo "$ (@)_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath $(@)).o -o $(abspath $(@))233 $(CFACOMPILETEST) -include exceptions/with-threads.hfa -c -o $(abspath ${@}).o 234 $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@}) 249 235 250 236 # Linking tests 251 237 # Meta tests to make sure we see linking errors (can't compile with -O2 since it may multiply number of calls) 252 238 linking/linkerror : linking/linkerror.cfa $(CFACCBIN) 253 $(CFACOMPILETEST) -O0 -c -o $(abspath $ (@)).o254 $(CFACCLINK) -O0 $ (@).o -o $(abspath $(@))255 rm $(abspath $ (@)).o239 $(CFACOMPILETEST) -O0 -c -o $(abspath ${@}).o 240 $(CFACCLINK) -O0 ${@}.o -o $(abspath ${@}) 241 rm $(abspath ${@}).o 256 242 257 243 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.