Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.in

    r655c5fa r34e1494  
    212212AWK = @AWK@
    213213BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
    214 CC = @CFACC@
     214
     215# adjust CC to current flags
     216CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
    215217CCAS = @CCAS@
    216218CCASDEPMODE = @CCASDEPMODE@
    217219CCASFLAGS = @CCASFLAGS@
    218220CCDEPMODE = @CCDEPMODE@
    219 CFACC = @CFACC@
     221CFACC = $(CC)
    220222CFACPP = @CFACPP@
    221223CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    248250FGREP = @FGREP@
    249251GREP = @GREP@
     252HAS_DISTCC = @HAS_DISTCC@
    250253HOST_FLAGS = @HOST_FLAGS@
    251254INSTALL = @INSTALL@
     
    386389
    387390# applies to both programs
    388 AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \
    389         -quiet @CFA_FLAGS@ -DIN_DIR="${abs_srcdir}/.in/" \
    390         ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
     391# since automake doesn't have support for CFA we have to
     392AM_CFLAGS = $(if $(test), 2> $(test), ) \
     393        -g \
     394        -Wall \
     395        -Wno-unused-function \
     396        -quiet @CFA_FLAGS@ \
     397        -DIN_DIR="${abs_srcdir}/.in/"
     398
     399
     400# get local binary for depedencies
     401CFACCBIN = @CFACC@
     402
     403# adjusted CC but without the actual distcc call
     404CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
    391405PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    392406avl_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
     
    397411
    398412# Use for all tests, make sure the path are correct and all flags are added
    399 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
    400 
    401 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail
    402 CFATEST_STDOUT = $(CFACOMPILETEST) -o $(abspath ${@})
    403 
    404 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr
    405 CFATEST_STDERR = $(CFACOMPILETEST) 2> $(abspath ${@})
     413CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g'))
    406414
    407415#------------------------------------------------------------------------------
    408 # TARGET WITH STANDARD RULE BUT CUSTOM FLAGS
     416# TARGETS WITH CUSTOM FLAGS
    409417#------------------------------------------------------------------------------
    410 # Expected failures
    411 declarationSpecifier_FLAGS = -CFA -XCFA -p
    412 gccExtensions_FLAGS = -CFA -XCFA -p
    413 extension_FLAGS = -CFA -XCFA -p
    414 attributes_FLAGS = -CFA -XCFA -p
    415 functions_FLAGS = -CFA -XCFA -p
    416 KRfunctions_FLAGS = -CFA -XCFA -p
    417 gmp_FLAGS = -lgmp
     418# custom libs
     419gmp_FLAGSLD = -lgmp
    418420
    419421#------------------------------------------------------------------------------
    420 # Expected failures
    421 completeTypeError_FLAGS = -DERR1
     422# Generated code
     423GENERATED_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
     426EXPECT_STDERR = builtins/sync warnings/self-assignment
    422427all: all-am
    423428
     
    771776#----------------------------------------------------------------------------------------------------------------
    772777all-local :
    773         @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
     778        @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    774779
    775780all-tests :
    776         @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     781        @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    777782
    778783clean-local :
     
    801806
    802807# implicit rule so not all test require a rule
    803 % : %.cfa $(CFACC)
    804         $(CFATEST_STDOUT)
    805 
     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
     810% : %.cfa $(CFACCBIN)
     811        $(CFACOMPILETEST) -c -o $(abspath ${@}).o
     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
    806816% : %.cpp
    807817        $(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 ${@})
    808822
    809823#------------------------------------------------------------------------------
    810824# CUSTOM TARGET
    811825#------------------------------------------------------------------------------
    812 typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
    813         $(CFATEST_STDOUT) -DERR1
    814 
    815 alloc-ERROR: alloc.cfa $(CFACC)
    816         $(CFATEST_STDOUT) -DERR1
    817 
    818 nested-types-ERR1: nested-types.cfa $(CFACC)
    819         $(CFATEST_STDOUT) -DERR1
    820 
    821 nested-types-ERR2: nested-types.cfa $(CFACC)
    822         $(CFATEST_STDOUT) -DERR2
    823 
    824 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
    825         $(CFATEST_STDOUT) -DERR1
    826 
    827 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
    828         $(CFATEST_STDOUT) -DERR2
    829 
    830 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
    831         $(CFATEST_STDOUT) -DERR1
    832 
    833 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
    834         $(CFATEST_STDOUT) -DERR1
    835 
    836 #builtins
    837 builtins/sync: builtins/sync.cfa $(CFACC)
    838         $(CFATEST_STDERR) -fsyntax-only
    839 
    840 # Warnings
    841 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
    842         $(CFATEST_STDERR) -fsyntax-only
     826# expected failures
     827# use custom target since they require a custom define and custom dependencies
     828alloc-ERROR : alloc.cfa $(CFACCBIN)
     829        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     830
     831typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN)
     832        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     833
     834nested-types-ERR1 : nested-types.cfa $(CFACCBIN)
     835        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     836
     837nested-types-ERR2 : nested-types.cfa $(CFACCBIN)
     838        $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
     839
     840raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN)
     841        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     842
     843raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN)
     844        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     845
     846raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN)
     847        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     848
     849raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN)
     850        $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
     851
     852#------------------------------------------------------------------------------
     853# Other targets
    843854
    844855# Tell versions [3.59,3.63) of GNU make to not export all variables.
Note: See TracChangeset for help on using the changeset viewer.