Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.in

    r34e1494 r655c5fa  
    212212AWK = @AWK@
    213213BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
    214 
    215 # adjust CC to current flags
    216 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
     214CC = @CFACC@
    217215CCAS = @CCAS@
    218216CCASDEPMODE = @CCASDEPMODE@
    219217CCASFLAGS = @CCASFLAGS@
    220218CCDEPMODE = @CCDEPMODE@
    221 CFACC = $(CC)
     219CFACC = @CFACC@
    222220CFACPP = @CFACPP@
    223221CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    250248FGREP = @FGREP@
    251249GREP = @GREP@
    252 HAS_DISTCC = @HAS_DISTCC@
    253250HOST_FLAGS = @HOST_FLAGS@
    254251INSTALL = @INSTALL@
     
    389386
    390387# applies to both programs
    391 # since automake doesn't have support for CFA we have to
    392 AM_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
    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})
     388AM_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}
    405391PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    406392avl_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
     
    411397
    412398# Use for all tests, make sure the path are correct and all flags are added
    413 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g'))
     399CFACOMPILETEST = $(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
     402CFATEST_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
     405CFATEST_STDERR = $(CFACOMPILETEST) 2> $(abspath ${@})
    414406
    415407#------------------------------------------------------------------------------
    416 # TARGETS WITH CUSTOM FLAGS
     408# TARGET WITH STANDARD RULE BUT CUSTOM FLAGS
    417409#------------------------------------------------------------------------------
    418 # custom libs
    419 gmp_FLAGSLD = -lgmp
     410# Expected failures
     411declarationSpecifier_FLAGS = -CFA -XCFA -p
     412gccExtensions_FLAGS = -CFA -XCFA -p
     413extension_FLAGS = -CFA -XCFA -p
     414attributes_FLAGS = -CFA -XCFA -p
     415functions_FLAGS = -CFA -XCFA -p
     416KRfunctions_FLAGS = -CFA -XCFA -p
     417gmp_FLAGS = -lgmp
    420418
    421419#------------------------------------------------------------------------------
    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
     420# Expected failures
     421completeTypeError_FLAGS = -DERR1
    427422all: all-am
    428423
     
    776771#----------------------------------------------------------------------------------------------------------------
    777772all-local :
    778         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
     773        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    779774
    780775all-tests :
    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
     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
    782777
    783778clean-local :
     
    806801
    807802# implicit rule so not all test require a rule
    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
     803% : %.cfa $(CFACC)
     804        $(CFATEST_STDOUT)
     805
    816806% : %.cpp
    817807        $(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 ${@})
    822808
    823809#------------------------------------------------------------------------------
    824810# CUSTOM TARGET
    825811#------------------------------------------------------------------------------
    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
     812typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
     813        $(CFATEST_STDOUT) -DERR1
     814
     815alloc-ERROR: alloc.cfa $(CFACC)
     816        $(CFATEST_STDOUT) -DERR1
     817
     818nested-types-ERR1: nested-types.cfa $(CFACC)
     819        $(CFATEST_STDOUT) -DERR1
     820
     821nested-types-ERR2: nested-types.cfa $(CFACC)
     822        $(CFATEST_STDOUT) -DERR2
     823
     824raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
     825        $(CFATEST_STDOUT) -DERR1
     826
     827raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
     828        $(CFATEST_STDOUT) -DERR2
     829
     830raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
     831        $(CFATEST_STDOUT) -DERR1
     832
     833raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
     834        $(CFATEST_STDOUT) -DERR1
     835
     836#builtins
     837builtins/sync: builtins/sync.cfa $(CFACC)
     838        $(CFATEST_STDERR) -fsyntax-only
     839
     840# Warnings
     841warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
     842        $(CFATEST_STDERR) -fsyntax-only
    854843
    855844# Tell versions [3.59,3.63) of GNU make to not export all variables.
Note: See TracChangeset for help on using the changeset viewer.