Changeset 34e1494
- 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
- Location:
- tests
- Files:
-
- 3 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 -
tests/Makefile.in
r15f9c8e r34e1494 212 212 AWK = @AWK@ 213 213 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 214 215 # adjust CC to current flags 214 216 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}) 215 217 CCAS = @CCAS@ … … 395 397 -DIN_DIR="${abs_srcdir}/.in/" 396 398 399 400 # get local binary for depedencies 397 401 CFACCBIN = @CFACC@ 402 403 # adjusted CC but without the actual distcc call 404 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}) 398 405 PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && 399 406 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 … … 404 411 405 412 # Use for all tests, make sure the path are correct and all flags are added 406 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g')) 407 408 # Use for tests that either generate an executable, print directly to stdout or the make command is expected to fail 409 CFATEST_STDOUT = $(CFACOMPILETEST) -o $(abspath ${@}) 410 411 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr 412 CFATEST_STDERR = $(CFACOMPILETEST) 2> $(abspath ${@}) 413 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g')) 413 414 414 415 #------------------------------------------------------------------------------ 415 # TARGET WITH STANDARD RULE BUTCUSTOM FLAGS416 # TARGETS WITH CUSTOM FLAGS 416 417 #------------------------------------------------------------------------------ 417 # Expected failures 418 declarationSpecifier_FLAGS = -CFA -XCFA -p 419 gccExtensions_FLAGS = -CFA -XCFA -p 420 extension_FLAGS = -CFA -XCFA -p 421 attributes_FLAGS = -CFA -XCFA -p 422 functions_FLAGS = -CFA -XCFA -p 423 KRfunctions_FLAGS = -CFA -XCFA -p 424 gmp_FLAGS = -lgmp 418 # custom libs 419 gmp_FLAGSLD = -lgmp 425 420 426 421 #------------------------------------------------------------------------------ 427 # Expected failures 428 completeTypeError_FLAGS = -DERR1 422 # Generated code 423 GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions 424 425 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr 426 EXPECT_STDERR = builtins/sync warnings/self-assignment 429 427 all: all-am 430 428 … … 809 807 # implicit rule so not all test require a rule 810 808 # split into two steps to support compiling remotely using distcc 809 # don't use distcc to do the linking because distcc doesn't do linking 811 810 % : %.cfa $(CFACCBIN) 812 811 $(CFACOMPILETEST) -c -o $(abspath ${@}).o 813 $(CFACC) $(abspath ${@}).o -o $(abspath ${@}) 814 815 # second implicit rule for programs that don't produce an executable 816 # still in two steps for distcc 817 declarationSpecifier gccExtensions extension attributes functions KRfunctions : % : %.cfa $(CFACCBIN) 818 $(CFACOMPILETEST) -CFA -XCFA -p -o $(abspath ${@}).o 819 mv $(abspath ${@}).o $(abspath ${@}) 820 812 $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@}) 813 814 # implicit rule for c++ test 815 # convient for testing the testsuite itself but not actuall used 821 816 % : %.cpp 822 817 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 818 $(GENERATED_CODE): % : %.cfa $(CFACCBIN) 819 $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@}) 820 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN) 821 $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@}) 823 822 824 823 #------------------------------------------------------------------------------ 825 824 # CUSTOM TARGET 826 825 #------------------------------------------------------------------------------ 827 typedefRedef-ERR1: typedefRedef.cfa $(CFACCBIN) 828 $(CFATEST_STDOUT) -DERR1 829 830 alloc-ERROR: alloc.cfa $(CFACCBIN) 831 $(CFATEST_STDOUT) -DERR1 832 833 nested-types-ERR1: nested-types.cfa $(CFACCBIN) 834 $(CFATEST_STDOUT) -DERR1 835 836 nested-types-ERR2: nested-types.cfa $(CFACCBIN) 837 $(CFATEST_STDOUT) -DERR2 838 839 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACCBIN) 840 $(CFATEST_STDOUT) -DERR1 841 842 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACCBIN) 843 $(CFATEST_STDOUT) -DERR2 844 845 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACCBIN) 846 $(CFATEST_STDOUT) -DERR1 847 848 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACCBIN) 849 $(CFATEST_STDOUT) -DERR1 850 851 #builtins 852 builtins/sync: builtins/sync.cfa $(CFACCBIN) 853 $(CFATEST_STDERR) -fsyntax-only 854 855 # Warnings 856 warnings/self-assignment: warnings/self-assignment.cfa $(CFACCBIN) 857 $(CFATEST_STDERR) -fsyntax-only 826 # expected failures 827 # use custom target since they require a custom define and custom dependencies 828 alloc-ERROR : alloc.cfa $(CFACCBIN) 829 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 830 831 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN) 832 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 833 834 nested-types-ERR1 : nested-types.cfa $(CFACCBIN) 835 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 836 837 nested-types-ERR2 : nested-types.cfa $(CFACCBIN) 838 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 839 840 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN) 841 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 842 843 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN) 844 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 845 846 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN) 847 $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@}) 848 849 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN) 850 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 851 852 #------------------------------------------------------------------------------ 853 # Other targets 858 854 859 855 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
tests/pybin/tools.py
r15f9c8e r34e1494 261 261 os.write(int(make_jobs_fds.group(3)), tokens) 262 262 else : 263 options.jobs = multiprocessing.cpu_count() 263 if settings.distribute: 264 ret, jstr = sh("distcc", "-j", output_file=subprocess.PIPE, ignore_dry_run=True) 265 if ret == 0: 266 options.jobs = int(jstr.strip()) 267 else : 268 options.jobs = multiprocessing.cpu_count() 269 else: 270 options.jobs = multiprocessing.cpu_count() 264 271 else : 265 272 force = True
Note: See TracChangeset
for help on using the changeset viewer.