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