Changeset 34e1494 for tests/Makefile.am
- Timestamp:
- Sep 13, 2019, 2:04:11 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 158b026, 2cb85774, 970141d, b2a37b0
- Parents:
- 15f9c8e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
r15f9c8e r34e1494 43 43 -DIN_DIR="${abs_srcdir}/.in/" 44 44 45 # adjust CC to current flags 45 46 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}) 47 CFACC = $(CC) 48 49 # get local binary for depedencies 46 50 CFACCBIN = @CFACC@ 47 CFACC = $(CC) 51 52 # adjusted CC but without the actual distcc call 53 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}) 48 54 49 55 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && … … 89 95 90 96 # Use for all tests, make sure the path are correct and all flags are added 91 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g')) 92 93 # Use for tests that either generate an executable, print directly to stdout or the make command is expected to fail 94 CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@}) 95 96 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr 97 CFATEST_STDERR=$(CFACOMPILETEST) 2> $(abspath ${@}) 97 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g')) 98 98 99 99 #---------------------------------------------------------------------------------------------------------------- … … 101 101 # implicit rule so not all test require a rule 102 102 # split into two steps to support compiling remotely using distcc 103 # don't use distcc to do the linking because distcc doesn't do linking 103 104 % : %.cfa $(CFACCBIN) 104 105 $(CFACOMPILETEST) -c -o $(abspath ${@}).o 105 $(CFACC ) $(abspath ${@}).o -o $(abspath ${@})106 $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@}) 106 107 107 # second implicit rule for programs that don't produce an executable 108 # still in two steps for distcc 109 declarationSpecifier gccExtensions extension attributes functions KRfunctions : % : %.cfa $(CFACCBIN) 110 $(CFACOMPILETEST) -CFA -XCFA -p -o $(abspath ${@}).o 111 mv $(abspath ${@}).o $(abspath ${@}) 112 108 # implicit rule for c++ test 109 # convient for testing the testsuite itself but not actuall used 113 110 % : %.cpp 114 111 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 115 112 116 113 #------------------------------------------------------------------------------ 117 # TARGET WITH STANDARD RULE BUTCUSTOM FLAGS114 # TARGETS WITH CUSTOM FLAGS 118 115 #------------------------------------------------------------------------------ 119 # Expected failures 120 declarationSpecifier_FLAGS= -CFA -XCFA -p 121 gccExtensions_FLAGS= -CFA -XCFA -p 122 extension_FLAGS= -CFA -XCFA -p 123 attributes_FLAGS= -CFA -XCFA -p 124 functions_FLAGS= -CFA -XCFA -p 125 KRfunctions_FLAGS= -CFA -XCFA -p 126 gmp_FLAGS= -lgmp 116 # custom libs 117 gmp_FLAGSLD= -lgmp 127 118 128 119 #------------------------------------------------------------------------------ 129 # Expected failures 130 completeTypeError_FLAGS= -DERR1 120 # Generated code 121 GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions 122 $(GENERATED_CODE): % : %.cfa $(CFACCBIN) 123 $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@}) 124 125 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr 126 EXPECT_STDERR = builtins/sync warnings/self-assignment 127 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN) 128 $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@}) 131 129 132 130 #------------------------------------------------------------------------------ 133 131 # CUSTOM TARGET 134 132 #------------------------------------------------------------------------------ 135 typedefRedef-ERR1: typedefRedef.cfa $(CFACCBIN) 136 $(CFATEST_STDOUT) -DERR1 133 # expected failures 134 # use custom target since they require a custom define and custom dependencies 135 alloc-ERROR : alloc.cfa $(CFACCBIN) 136 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 137 137 138 alloc-ERROR: alloc.cfa $(CFACCBIN)139 $(CFA TEST_STDOUT) -DERR1138 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN) 139 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 140 140 141 nested-types-ERR1 : nested-types.cfa $(CFACCBIN)142 $(CFA TEST_STDOUT) -DERR1141 nested-types-ERR1 : nested-types.cfa $(CFACCBIN) 142 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 143 143 144 nested-types-ERR2 : nested-types.cfa $(CFACCBIN)145 $(CFA TEST_STDOUT) -DERR2144 nested-types-ERR2 : nested-types.cfa $(CFACCBIN) 145 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 146 146 147 raii/ dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACCBIN)148 $(CFA TEST_STDOUT) -DERR1147 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN) 148 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 149 149 150 raii/ dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACCBIN)151 $(CFA TEST_STDOUT) -DERR2150 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN) 151 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 152 152 153 raii/ memberCtors-ERR1: raii/memberCtors.cfa $(CFACCBIN)154 $(CFA TEST_STDOUT) -DERR1153 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN) 154 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 155 155 156 raii/ ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACCBIN)157 $(CFA TEST_STDOUT) -DERR1156 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN) 157 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 158 158 159 #builtins 160 builtins/sync: builtins/sync.cfa $(CFACCBIN) 161 $(CFATEST_STDERR) -fsyntax-only 162 163 # Warnings 164 warnings/self-assignment: warnings/self-assignment.cfa $(CFACCBIN) 165 $(CFATEST_STDERR) -fsyntax-only 159 #------------------------------------------------------------------------------ 160 # Other targets
Note: See TracChangeset
for help on using the changeset viewer.