Changes in tests/Makefile.am [e16797c:e3a5a73]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
re16797c re3a5a73 23 23 installed=no 24 24 25 INSTALL_FLAGS=-in-tree 26 DEBUG_FLAGS=-debug -O0 27 25 28 quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes 26 29 … … 41 44 CC = @CFACC@ 42 45 43 PRETTY_PATH= mkdir -p $(dir $(abspath ${@})) &&cd ${srcdir} &&46 PRETTY_PATH=cd ${srcdir} && 44 47 45 48 .PHONY: list .validate … … 82 85 #---------------------------------------------------------------------------------------------------------------- 83 86 84 # Use for all tests, make sure the path are correct and all flags are added85 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))86 87 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail88 CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@})89 90 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr91 CFATEST_STDERR=$(CFACOMPILETEST) 2> $(abspath ${@})92 93 #----------------------------------------------------------------------------------------------------------------94 95 87 # implicit rule so not all test require a rule 96 88 % : %.cfa $(CFACC) 97 $( CFATEST_STDOUT)89 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 98 90 99 91 % : %.cpp 100 92 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 101 93 102 #------------------------------------------------------------------------------ 103 # TARGET WITH STANDARD RULE BUT CUSTOM FLAGS 104 #------------------------------------------------------------------------------ 105 # Expected failures 106 declarationSpecifier_FLAGS= -CFA -XCFA -p 107 gccExtensions_FLAGS= -CFA -XCFA -p 108 extension_FLAGS= -CFA -XCFA -p 109 attributes_FLAGS= -CFA -XCFA -p 110 functions_FLAGS= -CFA -XCFA -p 111 KRfunctions_FLAGS= -CFA -XCFA -p 112 gmp_FLAGS= -lgmp 94 declarationSpecifier: declarationSpecifier.cfa $(CFACC) 95 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 113 96 114 #------------------------------------------------------------------------------ 115 # Expected failures 116 completeTypeError_FLAGS= -DERR1 97 gccExtensions : gccExtensions.cfa $(CFACC) 98 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 117 99 118 #------------------------------------------------------------------------------ 119 # CUSTOM TARGET 120 #------------------------------------------------------------------------------ 121 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 122 $(CFATEST_STDOUT) -DERR1 100 extension : extension.cfa $(CFACC) 101 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 123 102 124 a lloc-ERROR: alloc.cfa $(CFACC)125 $( CFATEST_STDOUT) -DERR1103 attributes : attributes.cfa $(CFACC) 104 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 126 105 127 nested-types-ERR1: nested-types.cfa $(CFACC)128 $( CFATEST_STDOUT) -DERR1106 functions: functions.cfa $(CFACC) 107 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 129 108 130 nested-types-ERR2: nested-types.cfa $(CFACC)131 $( CFATEST_STDOUT) -DERR2109 KRfunctions : KRfunctions.cfa $(CFACC) 110 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 132 111 133 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa$(CFACC)134 $( CFATEST_STDOUT) -DERR1112 sched-ext-parse : sched-ext-parse.c $(CFACC) 113 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 135 114 136 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 137 $(CFATEST_STDOUT) -DERR2 138 139 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 140 $(CFATEST_STDOUT) -DERR1 141 142 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 143 $(CFATEST_STDOUT) -DERR1 115 gmp : gmp.cfa $(CFACC) 116 $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 144 117 145 118 #builtins 146 119 builtins/sync: builtins/sync.cfa $(CFACC) 147 $(CFATEST_STDERR) -fsyntax-only 120 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 121 122 #------------------------------------------------------------------------------ 123 124 #To make errors path independent we need to cd into the correct directories 125 completeTypeError : completeTypeError.cfa $(CFACC) 126 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 127 128 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 129 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 130 131 alloc-ERROR: alloc.cfa $(CFACC) 132 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 133 134 fallthrough-ERROR: fallthrough.cfa $(CFACC) 135 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 136 137 nested-types-ERR1: nested-types.cfa $(CFACC) 138 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 139 140 nested-types-ERR2: nested-types.cfa $(CFACC) 141 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 142 143 # Constructor/destructor tests 144 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC) 145 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 146 147 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 148 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 149 150 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 151 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 152 153 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 154 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 148 155 149 156 # Warnings 150 157 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC) 151 $( CFATEST_STDERR) -fsyntax-only158 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
Note: See TracChangeset
for help on using the changeset viewer.