Changeset d65f92c for tests/Makefile.am


Ignore:
Timestamp:
Aug 15, 2019, 10:21:36 AM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
5c4a473
Parents:
1ee048fd
Message:

Tests almost work, the only issue left is using -E and -CFA together

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    r1ee048fd rd65f92c  
    3434
    3535# applies to both programs
     36# since automake doesn't have support for CFA we have to
    3637AM_CFLAGS = $(if $(test), 2> $(test), ) \
    3738        -g \
     
    4142        -DIN_DIR="${abs_srcdir}/.in/"
    4243
    43 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
    44 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)
    4547
    4648PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
     
    5658#----------------------------------------------------------------------------------------------------------------
    5759all-local :
    58         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
     60        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test}
    5961
    6062all-tests :
    61         @+${TEST_PY} --debug=${debug}  --install=${installed} ${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
    6264
    6365clean-local :
     
    8688
    8789# Use for all tests, make sure the path are correct and all flags are added
    88 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'))
    8991
    90 # 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
    9193CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@})
    9294
     
    9799
    98100# implicit rule so not all test require a rule
    99 % : %.cfa $(CFACC)
    100         $(CFATEST_STDOUT)
     101% : %.cfa $(CFACCBIN)
     102        $(CFACOMPILETEST) -o $(abspath ${@}).o
     103        $(CFACC) $(abspath ${@}).o -o $(abspath ${@})
     104
    101105
    102106% : %.cpp
     
    122126# CUSTOM TARGET
    123127#------------------------------------------------------------------------------
    124 typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
     128typedefRedef-ERR1: typedefRedef.cfa $(CFACCBIN)
    125129        $(CFATEST_STDOUT) -DERR1
    126130
    127 alloc-ERROR: alloc.cfa $(CFACC)
     131alloc-ERROR: alloc.cfa $(CFACCBIN)
    128132        $(CFATEST_STDOUT) -DERR1
    129133
    130 nested-types-ERR1: nested-types.cfa $(CFACC)
     134nested-types-ERR1: nested-types.cfa $(CFACCBIN)
    131135        $(CFATEST_STDOUT) -DERR1
    132136
    133 nested-types-ERR2: nested-types.cfa $(CFACC)
     137nested-types-ERR2: nested-types.cfa $(CFACCBIN)
    134138        $(CFATEST_STDOUT) -DERR2
    135139
    136 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
     140raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACCBIN)
    137141        $(CFATEST_STDOUT) -DERR1
    138142
    139 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
     143raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACCBIN)
    140144        $(CFATEST_STDOUT) -DERR2
    141145
    142 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
     146raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACCBIN)
    143147        $(CFATEST_STDOUT) -DERR1
    144148
    145 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
     149raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACCBIN)
    146150        $(CFATEST_STDOUT) -DERR1
    147151
    148152#builtins
    149 builtins/sync: builtins/sync.cfa $(CFACC)
     153builtins/sync: builtins/sync.cfa $(CFACCBIN)
    150154        $(CFATEST_STDERR) -fsyntax-only
    151155
    152156# Warnings
    153 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
     157warnings/self-assignment: warnings/self-assignment.cfa $(CFACCBIN)
    154158        $(CFATEST_STDERR) -fsyntax-only
Note: See TracChangeset for help on using the changeset viewer.