Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.in

    r1d72a11 rdcfedca  
    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) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     214CC = @CFACC@
    217215CCAS = @CCAS@
    218216CCASDEPMODE = @CCASDEPMODE@
    219217CCASFLAGS = @CCASFLAGS@
    220218CCDEPMODE = @CCDEPMODE@
    221 CFACC = $(CC)
    222 CFACC_INSTALL = @CFACC_INSTALL@
     219CFACC = @CFACC@
    223220CFACPP = @CFACPP@
    224221CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    251248FGREP = @FGREP@
    252249GREP = @GREP@
    253 HAS_DISTCC = @HAS_DISTCC@
    254250HOST_FLAGS = @HOST_FLAGS@
    255251INSTALL = @INSTALL@
     
    358354LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
    359355        $(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \
    360         $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(AM_CFLAGS) $(CFAFLAGS) $(CFLAGS)
     356        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \
     357        $(AM_CFLAGS) $(CFLAGS)
    361358
    362359AM_V_CFA = $(am__v_CFA_@AM_V@)
     
    364361am__v_CFA_0 = @echo "  CFA     " $@;
    365362am__v_CFA_1 =
     363AM_V_JAVAC = $(am__v_JAVAC_@AM_V@)
     364am__v_JAVAC_ = $(am__v_JAVAC_@AM_DEFAULT_V@)
     365am__v_JAVAC_0 = @echo "  JAVAC   " $@;
     366am__v_JAVAC_1 =
     367AM_V_GOC = $(am__v_GOC_@AM_V@)
     368am__v_GOC_ = $(am__v_GOC_@AM_DEFAULT_V@)
     369am__v_GOC_0 = @echo "  GOC     " $@;
     370am__v_GOC_1 =
    366371UPPCC = u++
    367372UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS)
     
    370375am__v_UPP_0 = @echo "  UPP     " $@;
    371376am__v_UPP_1 =
    372 AM_V_GOC = $(am__v_GOC_@AM_V@)
    373 am__v_GOC_ = $(am__v_GOC_@AM_DEFAULT_V@)
    374 am__v_GOC_0 = @echo "  GOC     " $@;
    375 am__v_GOC_1 =
    376 AM_V_PY = $(am__v_PY_@AM_V@)
    377 am__v_PY_ = $(am__v_PY_@AM_DEFAULT_V@)
    378 am__v_PY_0 = @echo "  PYTHON  " $@;
    379 am__v_PY_1 =
    380 AM_V_RUST = $(am__v_RUST_@AM_V@)
    381 am__v_RUST_ = $(am__v_RUST_@AM_DEFAULT_V@)
    382 am__v_RUST_0 = @echo "  RUST    " $@;
    383 am__v_RUST_1 =
    384 AM_V_NODEJS = $(am__v_NODEJS_@AM_V@)
    385 am__v_NODEJS_ = $(am__v_NODEJS_@AM_DEFAULT_V@)
    386 am__v_NODEJS_0 = @echo "  NODEJS  " $@;
    387 am__v_NODEJS_1 =
    388 AM_V_JAVAC = $(am__v_JAVAC_@AM_V@)
    389 am__v_JAVAC_ = $(am__v_JAVAC_@AM_DEFAULT_V@)
    390 am__v_JAVAC_0 = @echo "  JAVAC   " $@;
    391 am__v_JAVAC_1 =
    392377debug = yes
    393378installed = no
    394379archiveerrors =
     380INSTALL_FLAGS = -in-tree
    395381DEBUG_FLAGS = -debug -O0
    396382quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
     
    400386
    401387# applies to both programs
    402 # since automake doesn't have support for CFA we have to
    403 AM_CFLAGS = $(if $(test), 2> $(test), ) \
    404         -g \
    405         -Wall \
    406         -Wno-unused-function \
    407         -quiet @CFA_FLAGS@ \
    408         -DIN_DIR="${abs_srcdir}/.in/"
    409 
    410 
    411 # get the desired cfa to test
    412 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@)
    413 
    414 # get local binary for depedencies
    415 CFACCBIN = @CFACC@
    416 
    417 # adjusted CC but without the actual distcc call
    418 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_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}
    419391PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    420392avl_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
     
    425397
    426398# Use for all tests, make sure the path are correct and all flags are added
    427 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 ${@})
    428406
    429407#------------------------------------------------------------------------------
    430 # TARGETS WITH CUSTOM FLAGS
     408# TARGET WITH STANDARD RULE BUT CUSTOM FLAGS
    431409#------------------------------------------------------------------------------
    432 # custom libs
    433 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
    434418
    435419#------------------------------------------------------------------------------
    436 # Generated code
    437 GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions
    438 
    439 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr
    440 EXPECT_STDERR = builtins/sync warnings/self-assignment
     420# Expected failures
     421completeTypeError_FLAGS = -DERR1
    441422all: all-am
    442423
     
    790771#----------------------------------------------------------------------------------------------------------------
    791772all-local :
    792         @+${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}
    793774
    794775all-tests :
    795         @+${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
    796777
    797778clean-local :
     
    820801
    821802# implicit rule so not all test require a rule
    822 # split into two steps to support compiling remotely using distcc
    823 # don't use distcc to do the linking because distcc doesn't do linking
    824 % : %.cfa $(CFACCBIN)
    825         $(CFACOMPILETEST) -c -o $(abspath ${@}).o
    826         $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@})
    827 
    828 # implicit rule for c++ test
    829 # convient for testing the testsuite itself but not actuall used
     803% : %.cfa $(CFACC)
     804        $(CFATEST_STDOUT)
     805
    830806% : %.cpp
    831807        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    832 $(GENERATED_CODE): % : %.cfa $(CFACCBIN)
    833         $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@})
    834 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN)
    835         $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
    836808
    837809#------------------------------------------------------------------------------
    838810# CUSTOM TARGET
    839811#------------------------------------------------------------------------------
    840 # expected failures
    841 # use custom target since they require a custom define and custom dependencies
    842 alloc-ERROR : alloc.cfa $(CFACCBIN)
    843         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    844 
    845 typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN)
    846         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    847 
    848 nested-types-ERR1 : nested-types.cfa $(CFACCBIN)
    849         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    850 
    851 nested-types-ERR2 : nested-types.cfa $(CFACCBIN)
    852         $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
    853 
    854 raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN)
    855         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    856 
    857 raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN)
    858         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    859 
    860 raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN)
    861         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    862 
    863 raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN)
    864         $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
    865 
    866 #------------------------------------------------------------------------------
    867 # 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
    868843
    869844# Tell versions [3.59,3.63) of GNU make to not export all variables.
Note: See TracChangeset for help on using the changeset viewer.