Changes in / [b3ce76f:386fb57]
- Files:
-
- 2 edited
-
Makefile.am (modified) (3 diffs)
-
tests/Makefile.am (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
rb3ce76f r386fb57 11 11 ## Created On : Sun May 31 22:14:18 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Fri May 12 18:30:01202314 ## Update Count : 4213 ## Last Modified On : Mon May 1 16:38:04 2023 14 ## Update Count : 32 15 15 ############################################################################### 16 17 # user targets: 18 # Compile compiler/runtime and run test suite. 19 # $ make check / tests [debug=yes/no] [installed=yes/no] [arch=x86/x64/arm] 20 # 21 # $ make installcheck [debug=yes/no] installed=yes [arch=x86/x64/arm] 16 22 17 23 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names … … 24 30 DIST_SUBDIRS = driver src . libcfa tests 25 31 26 @LIBCFA_TARGET_MAKEFILES@ : Makefile $ {srcdir}/libcfa/configure27 @$ {eval config_file = ${dir ${@}}config.data}28 @ls $ {config_file}|| (echo "Missing config.data, re-run configure script again" && false)29 @$ {eval config_data = ${shell cat ${config_file}}}30 @echo "Configuring libcfa ($ {abs_top_srcdir}/libcfa/configure) with '${config_data}' from ${shell pwd} / ${dir ${@}}"31 @cd $ {dir ${@}} && ${abs_top_srcdir}/libcfa/configure ${config_data}32 @LIBCFA_TARGET_MAKEFILES@ : Makefile $(srcdir)/libcfa/configure 33 @$(eval config_file = $(dir $@)config.data) 34 @ls $(config_file) || (echo "Missing config.data, re-run configure script again" && false) 35 @$(eval config_data = $(shell cat $(config_file))) 36 @echo "Configuring libcfa ($(abs_top_srcdir)/libcfa/configure) with '$(config_data)' from $(shell pwd) / $(dir $@)" 37 @cd $(dir $@) && $(abs_top_srcdir)/libcfa/configure $(config_data) 32 38 33 39 noinst_DATA = @LIBCFA_TARGET_MAKEFILES@ … … 39 45 debug ?= yes 40 46 installed ?= no 41 ARCH = $ {if ${arch},"arch=${arch}"}47 ARCH = $(if $(arch),"arch=$(arch)") 42 48 43 check :44 $ {MAKE} -C tests tests installed=${installed} debug=${debug} ${ARCH}49 check: 50 $(MAKE) -C tests tests installed=$(installed) debug=$(debug) $(ARCH) 45 51 46 tests : check # synonym52 tests: check # synonym 47 53 48 installcheck :49 $ {MAKE} -C tests tests installed=yes debug=${debug} ${ARCH}54 installcheck: 55 $(MAKE) -C tests tests installed=yes debug=$(debug) $(ARCH) 50 56 51 installtest : installcheck # synonym 52 53 help : 54 @echo "user targets:" 55 @echo " Compile compiler/runtime and run test suite." 56 @echo " $$ make check / tests [debug=yes/no] [installed=yes/no] [arch=x86/x64/arm]" 57 @echo "" 58 @echo " Compile compiler/runtime, run test suite, and install." 59 @echo " $$ make installcheck / installtests [debug=yes/no] installed=yes [arch=x86/x64/arm]" 60 61 configure-libcfa : @LIBCFA_TARGET_MAKEFILES@ 57 configure-libcfa: @LIBCFA_TARGET_MAKEFILES@ 62 58 @true 63 59 64 status : @LIBCFA_TARGET_MAKEFILES@60 status: @LIBCFA_TARGET_MAKEFILES@ 65 61 @echo -ne "translator\n\t" 66 62 @./config.status --config | sed "s/ /\n\t/g; s/\t'/\t/g; s/'\n/\n/g; s/^'//g; s/'$$//g" 67 63 @find libcfa -name config.status -printf "\n%h\n\t" -exec {} --config \; | sed "s/ /\n\t/g; s/\t'/\t/g; s/'\n/\n/g; s/^'//g; s/'$$//g" 68 64 69 @LIBCFA_TARGET_DIRS@ ::70 $ {MAKE} -C ${@} ${MAKECMDGOALS}65 @LIBCFA_TARGET_DIRS@:: 66 $(MAKE) -C $@ $(MAKECMDGOALS) 71 67 72 mostlyclean clean distclean maintainer-clean : @LIBCFA_TARGET_DIRS@68 mostlyclean clean distclean maintainer-clean: @LIBCFA_TARGET_DIRS@ -
tests/Makefile.am
rb3ce76f r386fb57 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Fri May 12 18:03:57202314 ## Update Count : 1 7613 ## 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}29 DEFAULT_INCLUDES = -I$(abs_srcdir) 23 30 24 31 debug ?= yes 25 32 installed ?= no 26 ARCH=$ {if ${arch},"--arch=${arch}"}33 ARCH=$(if $(arch),"--arch=$(arch)") 27 34 archiveerrors= 28 35 … … 34 41 timeouts= 35 42 36 TEST_PY = python3 $ {builddir}/test.py43 TEST_PY = python3 $(builddir)/test.py 37 44 38 45 # applies to both programs 39 46 # since automake doesn't have support for CFA we have to 40 AM_CFLAGS = $ {if ${test}, 2> ${test}, }\41 -fdebug-prefix-map=$ {abspath ${abs_srcdir}}= \47 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 48 -fdebug-prefix-map=$(abspath $(abs_srcdir))= \ 42 49 -fdebug-prefix-map=/tmp= \ 43 50 -fno-diagnostics-show-caret \ … … 52 59 53 60 # get the desired cfa to test 54 TARGET_CFA = $ {if ${filter ${installed},yes}, @CFACC_INSTALL@, @CFACC@}61 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@) 55 62 56 63 # adjust CC to current flags 57 CC = LC_ALL=C $ {if ${DISTCC_CFA_PATH},distcc ${DISTCC_CFA_PATH} ${ARCH_FLAGS} ,${TARGET_CFA} ${DEBUG_FLAGS} ${ARCH_FLAGS}}58 CFACC = $ {CC}64 CC = LC_ALL=C $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) $(ARCH_FLAGS) ,$(TARGET_CFA) $(DEBUG_FLAGS) $(ARCH_FLAGS)) 65 CFACC = $(CC) 59 66 60 67 # get local binary for depedencies … … 62 69 63 70 # adjusted CC but without the actual distcc call 64 CFACCLOCAL = $ {if ${DISTCC_CFA_PATH},${DISTCC_CFA_PATH} ${ARCH_FLAGS} ,${TARGET_CFA} ${DEBUG_FLAGS} ${ARCH_FLAGS}}65 CFACCLINK = $ {CFACCLOCAL} -quiet ${if ${test}, 2> ${test}, } ${${shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g'}}66 67 PRETTY_PATH=mkdir -p $ {dir ${abspath ${@}}} && cd ${srcdir}&&68 69 .PHONY : list .validate .test_makeflags70 .INTERMEDIATE : .validate .validate.cfa .test_makeflags71 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) && 75 76 .PHONY: list .validate .test_makeflags 77 .INTERMEDIATE: .validate .validate.cfa .test_makeflags 71 78 EXTRA_PROGRAMS = avl_test linkonce linking/mangling/anon .dummy_hack # build but do not install 72 79 EXTRA_DIST = test.py \ … … 94 101 dist-hook: 95 102 echo "Gathering test files" 96 for file in `$ {TEST_PY}--list-dist`; do \97 if test -f $ {srcdir}/$${file}; then \98 $ {MKDIR_P} $$(dirname ${distdir}/$${file}); \99 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}; \ 100 107 fi; \ 101 108 done 109 102 110 103 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 … … 110 118 111 119 all-local : # This name is important to automake and implies the default build target. 112 @+$ {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 program120 @+$(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 113 121 114 122 install : all-local # PAB only … … 117 125 118 126 quick : 119 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${ARCH} ${quick_test} 120 121 concurrency : 122 @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCH} -Iconcurrent 127 @+$(TEST_PY) --debug=$(debug) --install=$(installed) --archive-errors=$(archiveerrors) $(concurrent) $(timeouts) $(ARCH) $(quick_test) 128 129 mostlyclean-local : 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) 134 rm -rf __pycache__ 135 136 distclean-local : 137 find $(builddir) -path '*.Po' -delete 123 138 124 139 list : 125 @+${TEST_PY} --list ${concurrent} 126 127 help : 128 @echo "user targets:" 129 @echo " Run the complete test suite." 130 @echo " $$ make (null) / tests [debug=yes/no] [installed=yes/no] [arch=x86/x64/arm]" 131 @echo "" 132 @echo " Run the short (quick) test suite." 133 @echo " $$ make quick [debug=yes/no] [installed=yes/no] [arch=x86/x64/arm]" 134 @echo "" 135 @echo " Run the concurrent test suite." 136 @echo " $$ make concurrency [debug=yes/no] [installed=yes/no] [arch=x86/x64/arm]" 137 @echo "" 138 @echo " List all tests in the test suite." 139 @echo " $$ make list" 140 141 mostlyclean-local : 142 find ${builddir} -not -path './__pycache__/*' -path '*.o' -delete 143 find ${builddir} -not -path './__pycache__/*' -path '*/.err/*.log' -delete 144 find ${builddir} -not -path './__pycache__/*' -path '*/.out/*.log' -delete 145 rm -f ${EXTRA_PROGRAMS} 146 rm -rf __pycache__ 147 148 distclean-local : 149 find ${builddir} -path '*.Po' -delete 140 @+$(TEST_PY) --list $(concurrent) 150 141 151 142 .test_makeflags: 152 @echo "$ {MAKEFLAGS}"143 @echo "$(MAKEFLAGS)" 153 144 154 145 .validate: .validate.cfa 155 $ {CFACOMPILE}.validate.cfa -fsyntax-only -Wall -Wextra -Werror146 $(CFACOMPILE) .validate.cfa -fsyntax-only -Wall -Wextra -Werror 156 147 157 148 .validate.cfa: 158 @echo "int main() { return 0; }" > $ {@}149 @echo "int main() { return 0; }" > $(@) 159 150 160 151 # automake doesn't know we still need C rules so pretend like we have a C program 161 152 .dummy_hack.c: 162 @echo "int main() { return 0; }" > $ {@}153 @echo "int main() { return 0; }" > $(@) 163 154 164 155 .dummy_hackxx.cpp: 165 @echo "int bar() { return 0; }" > ${@} 156 @echo "int bar() { return 0; }" > $(@) 157 158 concurrency : 159 @+$(TEST_PY) --debug=$(debug) --install=$(installed) -Iconcurrent 166 160 167 161 #---------------------------------------------------------------------------------------------------------------- 168 162 169 163 # Use for all tests, make sure the path are correct and all flags are added 170 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')) 171 165 172 166 #---------------------------------------------------------------------------------------------------------------- … … 175 169 # split into two steps to support compiling remotely using distcc 176 170 # don't use distcc to do the linking because distcc doesn't do linking 177 % : %.cfa $ {CFACCBIN}178 $ {CFACOMPILETEST} -c -o ${abspath ${@}}.o -DIN_DIR="${abspath ${dir ${<}}}/.in/"179 $ {CFACCLINK} ${@}.o -o ${abspath ${@}}180 rm $ {abspath ${@}}.o171 % : %.cfa $(CFACCBIN) 172 $(CFACOMPILETEST) -c -o $(abspath $(@)).o -DIN_DIR="$(abspath $(dir $(<)))/.in/" 173 $(CFACCLINK) $(@).o -o $(abspath $(@)) 174 rm $(abspath $(@)).o 181 175 182 176 # implicit rule for c++ test 183 177 # convient for testing the testsuite itself but not actuall used 184 178 % : %.cpp 185 $ {PRETTY_PATH} ${CXXCOMPILE} ${shell realpath --relative-to=${srcdir} ${<}} -o ${abspath ${@}}179 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=$(srcdir) $(<)) -o $(abspath $(@)) 186 180 187 181 #------------------------------------------------------------------------------ … … 194 188 # Generated code 195 189 GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions 196 $ {GENERATED_CODE} : % : %.cfa ${CFACCBIN}197 $ {CFACOMPILETEST} -CFA -XCFA -p -c -fsyntax-only -o ${abspath ${@}}190 $(GENERATED_CODE): % : %.cfa $(CFACCBIN) 191 $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath $(@)) 198 192 199 193 #------------------------------------------------------------------------------ … … 201 195 #------------------------------------------------------------------------------ 202 196 # tests that just validate syntax and compiler output should be compared to stderr 203 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 $(@)) 204 198 205 199 SYNTAX_ONLY_CODE = expression typedefRedef variableDeclarator switch numericConstants identFuncDeclarator \ 206 200 init1 limits nested-types cast labelledExit array quasiKeyword include/stdincludes include/includes builtins/sync warnings/self-assignment concurrent/waitfor/parse 207 $ {SYNTAX_ONLY_CODE} : % : %.cfa ${CFACCBIN}208 $ {CFACOMPILE_SYNTAX}209 $ {if ${test}, cp ${test} ${abspath ${@}}, }201 $(SYNTAX_ONLY_CODE): % : %.cfa $(CFACCBIN) 202 $(CFACOMPILE_SYNTAX) 203 $(if $(test), cp $(test) $(abspath $(@)), ) 210 204 211 205 # expected failures 212 206 # use custom target since they require a custom define *and* have a name that doesn't match the file 213 alloc-ERROR : alloc.cfa $ {CFACCBIN}214 $ {CFACOMPILE_SYNTAX}-DERR1215 -cp $ {test} ${abspath ${@}}216 217 init1-ERROR : init1.cfa $ {CFACCBIN}218 $ {CFACOMPILE_SYNTAX}-DERR1219 -cp $ {test} ${abspath ${@}}220 221 typedefRedef-ERR1 : typedefRedef.cfa $ {CFACCBIN}222 $ {CFACOMPILE_SYNTAX}-DERR1223 -cp $ {test} ${abspath ${@}}224 225 nested-types-ERR1 : nested-types.cfa $ {CFACCBIN}226 $ {CFACOMPILE_SYNTAX}-DERR1227 -cp $ {test} ${abspath ${@}}228 229 nested-types-ERR2 : nested-types.cfa $ {CFACCBIN}230 $ {CFACOMPILE_SYNTAX}-DERR2231 -cp $ {test} ${abspath ${@}}232 233 raii/memberCtors-ERR1 : raii/memberCtors.cfa $ {CFACCBIN}234 $ {CFACOMPILE_SYNTAX}-DERR1235 -cp $ {test} ${abspath ${@}}236 237 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $ {CFACCBIN}238 $ {CFACOMPILE_SYNTAX}-DERR1239 -cp $ {test} ${abspath ${@}}240 241 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $ {CFACCBIN}242 $ {CFACOMPILE_SYNTAX}-DERR1243 -cp $ {test} ${abspath ${@}}244 245 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $ {CFACCBIN}246 $ {CFACOMPILE_SYNTAX}-DERR2247 -cp $ {test} ${abspath ${@}}207 alloc-ERROR : alloc.cfa $(CFACCBIN) 208 $(CFACOMPILE_SYNTAX) -DERR1 209 -cp $(test) $(abspath $(@)) 210 211 init1-ERROR : init1.cfa $(CFACCBIN) 212 $(CFACOMPILE_SYNTAX) -DERR1 213 -cp $(test) $(abspath $(@)) 214 215 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN) 216 $(CFACOMPILE_SYNTAX) -DERR1 217 -cp $(test) $(abspath $(@)) 218 219 nested-types-ERR1 : nested-types.cfa $(CFACCBIN) 220 $(CFACOMPILE_SYNTAX) -DERR1 221 -cp $(test) $(abspath $(@)) 222 223 nested-types-ERR2 : nested-types.cfa $(CFACCBIN) 224 $(CFACOMPILE_SYNTAX) -DERR2 225 -cp $(test) $(abspath $(@)) 226 227 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN) 228 $(CFACOMPILE_SYNTAX) -DERR1 229 -cp $(test) $(abspath $(@)) 230 231 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN) 232 $(CFACOMPILE_SYNTAX) -DERR1 233 -cp $(test) $(abspath $(@)) 234 235 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN) 236 $(CFACOMPILE_SYNTAX) -DERR1 237 -cp $(test) $(abspath $(@)) 238 239 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN) 240 $(CFACOMPILE_SYNTAX) -DERR2 241 -cp $(test) $(abspath $(@)) 248 242 249 243 # Exception Tests 250 244 # Test with libcfathread; it changes how storage works. 251 245 252 exceptions/%-threads : exceptions/%.cfa $ {CFACCBIN}253 $ {CFACOMPILETEST} -include exceptions/with-threads.hfa -c -o ${abspath ${@}}.o254 $ {CFACCLOCAL} ${${shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g'}} ${abspath ${@}}.o -o ${abspath ${@}}246 exceptions/%-threads : exceptions/%.cfa $(CFACCBIN) 247 $(CFACOMPILETEST) -include exceptions/with-threads.hfa -c -o $(abspath $(@)).o 248 $(CFACCLOCAL) $($(shell echo "$(@)_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath $(@)).o -o $(abspath $(@)) 255 249 256 250 # Linking tests 257 251 # Meta tests to make sure we see linking errors (can't compile with -O2 since it may multiply number of calls) 258 linking/linkerror : linking/linkerror.cfa $ {CFACCBIN}259 $ {CFACOMPILETEST} -O0 -c -o ${abspath ${@}}.o260 $ {CFACCLINK} -O0 ${@}.o -o ${abspath ${@}}261 rm $ {abspath ${@}}.o252 linking/linkerror : linking/linkerror.cfa $(CFACCBIN) 253 $(CFACOMPILETEST) -O0 -c -o $(abspath $(@)).o 254 $(CFACCLINK) -O0 $(@).o -o $(abspath $(@)) 255 rm $(abspath $(@)).o 262 256 263 257 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.