Changeset 4a60488 for tests/Makefile.am


Ignore:
Timestamp:
Sep 27, 2019, 3:35:46 PM (6 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
90ce35aa
Parents:
8e1467d (diff), 849720f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged from master taking the lvalue changes to expression and everything before that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    r8e1467d r4a60488  
    2222debug=yes
    2323installed=no
     24archiveerrors=
    2425
    25 INSTALL_FLAGS=-in-tree
    2626DEBUG_FLAGS=-debug -O0
    2727
     
    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@
     44# get the desired cfa to test
     45TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@)
     46
     47# adjust CC to current flags
     48CC = $(if $(ifeq $(DISTCC_CFA_PATH),yes),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     49CFACC = $(CC)
     50
     51# get local binary for depedencies
     52CFACCBIN = @CFACC@
     53
     54# adjusted CC but without the actual distcc call
     55CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
    4556
    4657PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
     
    5667#----------------------------------------------------------------------------------------------------------------
    5768all-local :
    58         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
     69        @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    5970
    6071all-tests :
    61         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     72        @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    6273
    6374clean-local :
     
    8697
    8798# 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'))
    89 
    90 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail
    91 CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@})
    92 
    93 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr
    94 CFATEST_STDERR=$(CFACOMPILETEST) 2> $(abspath ${@})
     99CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g'))
    95100
    96101#----------------------------------------------------------------------------------------------------------------
    97102
    98103# implicit rule so not all test require a rule
    99 % : %.cfa $(CFACC)
    100         $(CFATEST_STDOUT)
     104# split into two steps to support compiling remotely using distcc
     105# don't use distcc to do the linking because distcc doesn't do linking
     106% : %.cfa $(CFACCBIN)
     107        $(CFACOMPILETEST) -c -o $(abspath ${@}).o
     108        $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@})
    101109
     110# implicit rule for c++ test
     111# convient for testing the testsuite itself but not actuall used
    102112% : %.cpp
    103113        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    104114
    105115#------------------------------------------------------------------------------
    106 # TARGET WITH STANDARD RULE BUT CUSTOM FLAGS
     116# TARGETS WITH CUSTOM FLAGS
    107117#------------------------------------------------------------------------------
    108 # Expected failures
    109 declarationSpecifier_FLAGS= -CFA -XCFA -p
    110 gccExtensions_FLAGS= -CFA -XCFA -p
    111 extension_FLAGS= -CFA -XCFA -p
    112 attributes_FLAGS= -CFA -XCFA -p
    113 functions_FLAGS= -CFA -XCFA -p
    114 KRfunctions_FLAGS= -CFA -XCFA -p
    115 gmp_FLAGS= -lgmp
     118# custom libs
     119gmp_FLAGSLD= -lgmp
    116120
    117121#------------------------------------------------------------------------------
    118 # Expected failures
    119 completeTypeError_FLAGS= -DERR1
     122# Generated code
     123GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions
     124$(GENERATED_CODE): % : %.cfa $(CFACCBIN)
     125        $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@})
     126
     127# Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr
     128EXPECT_STDERR = builtins/sync warnings/self-assignment
     129$(EXPECT_STDERR): % : %.cfa $(CFACCBIN)
     130        $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
    120131
    121132#------------------------------------------------------------------------------
    122133# CUSTOM TARGET
    123134#------------------------------------------------------------------------------
    124 typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
    125         $(CFATEST_STDOUT) -DERR1
     135# expected failures
     136# use custom target since they require a custom define and custom dependencies
     137alloc-ERROR : alloc.cfa $(CFACCBIN)
     138        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    126139
    127 alloc-ERROR: alloc.cfa $(CFACC)
    128         $(CFATEST_STDOUT) -DERR1
     140typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN)
     141        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    129142
    130 nested-types-ERR1: nested-types.cfa $(CFACC)
    131         $(CFATEST_STDOUT) -DERR1
     143nested-types-ERR1 : nested-types.cfa $(CFACCBIN)
     144        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    132145
    133 nested-types-ERR2: nested-types.cfa $(CFACC)
    134         $(CFATEST_STDOUT) -DERR2
     146nested-types-ERR2 : nested-types.cfa $(CFACCBIN)
     147        $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
    135148
    136 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
    137         $(CFATEST_STDOUT) -DERR1
     149raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN)
     150        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    138151
    139 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
    140         $(CFATEST_STDOUT) -DERR2
     152raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN)
     153        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    141154
    142 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
    143         $(CFATEST_STDOUT) -DERR1
     155raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN)
     156        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
    144157
    145 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
    146         $(CFATEST_STDOUT) -DERR1
     158raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN)
     159        $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
    147160
    148 #builtins
    149 builtins/sync: builtins/sync.cfa $(CFACC)
    150         $(CFATEST_STDERR) -fsyntax-only
    151 
    152 # Warnings
    153 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
    154         $(CFATEST_STDERR) -fsyntax-only
     161#------------------------------------------------------------------------------
     162# Other targets
Note: See TracChangeset for help on using the changeset viewer.