Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    rdcfedca rd65f92c  
    2222debug=yes
    2323installed=no
    24 archiveerrors=
    2524
    2625INSTALL_FLAGS=-in-tree
     
    3534
    3635# applies to both programs
     36# since automake doesn't have support for CFA we have to
    3737AM_CFLAGS = $(if $(test), 2> $(test), ) \
    3838        -g \
     
    4242        -DIN_DIR="${abs_srcdir}/.in/"
    4343
    44 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
    45 CC = @CFACC@
     44CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
     45CFACCBIN = @CFACC@
     46CFACC = $(CC)
    4647
    4748PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
     
    5758#----------------------------------------------------------------------------------------------------------------
    5859all-local :
    59         @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
     60        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test}
    6061
    6162all-tests :
    62         @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     63        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    6364
    6465clean-local :
     
    8788
    8889# Use for all tests, make sure the path are correct and all flags are added
    89 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
     90CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) -c $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
    9091
    91 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail
     92# Use for tests that either generate an executable, print directly to stdout or the make command is expected to fail
    9293CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@})
    9394
     
    9899
    99100# implicit rule so not all test require a rule
    100 % : %.cfa $(CFACC)
    101         $(CFATEST_STDOUT)
     101% : %.cfa $(CFACCBIN)
     102        $(CFACOMPILETEST) -o $(abspath ${@}).o
     103        $(CFACC) $(abspath ${@}).o -o $(abspath ${@})
     104
    102105
    103106% : %.cpp
     
    123126# CUSTOM TARGET
    124127#------------------------------------------------------------------------------
    125 typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
     128typedefRedef-ERR1: typedefRedef.cfa $(CFACCBIN)
    126129        $(CFATEST_STDOUT) -DERR1
    127130
    128 alloc-ERROR: alloc.cfa $(CFACC)
     131alloc-ERROR: alloc.cfa $(CFACCBIN)
    129132        $(CFATEST_STDOUT) -DERR1
    130133
    131 nested-types-ERR1: nested-types.cfa $(CFACC)
     134nested-types-ERR1: nested-types.cfa $(CFACCBIN)
    132135        $(CFATEST_STDOUT) -DERR1
    133136
    134 nested-types-ERR2: nested-types.cfa $(CFACC)
     137nested-types-ERR2: nested-types.cfa $(CFACCBIN)
    135138        $(CFATEST_STDOUT) -DERR2
    136139
    137 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
     140raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACCBIN)
    138141        $(CFATEST_STDOUT) -DERR1
    139142
    140 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
     143raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACCBIN)
    141144        $(CFATEST_STDOUT) -DERR2
    142145
    143 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
     146raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACCBIN)
    144147        $(CFATEST_STDOUT) -DERR1
    145148
    146 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
     149raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACCBIN)
    147150        $(CFATEST_STDOUT) -DERR1
    148151
    149152#builtins
    150 builtins/sync: builtins/sync.cfa $(CFACC)
     153builtins/sync: builtins/sync.cfa $(CFACCBIN)
    151154        $(CFATEST_STDERR) -fsyntax-only
    152155
    153156# Warnings
    154 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
     157warnings/self-assignment: warnings/self-assignment.cfa $(CFACCBIN)
    155158        $(CFATEST_STDERR) -fsyntax-only
Note: See TracChangeset for help on using the changeset viewer.