Changeset eef8dfb for tests/Makefile.am


Ignore:
Timestamp:
Jan 7, 2021, 2:55:57 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
58fe85a
Parents:
bdfc032 (diff), 44e37ef (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:

Merge branch 'master' into dkobets-vector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    rbdfc032 reef8dfb  
    1111## Created On       : Sun May 31 09:08:15 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Tue Nov 20 11:18:51 2018
    14 ## Update Count     : 68
     13## Last Modified On : Fri Oct  9 23:13:07 2020
     14## Update Count     : 86
    1515###############################################################################
    1616
     
    1818ACLOCAL_AMFLAGS  = -I automake
    1919
    20 include $(top_srcdir)/src/cfa.make
     20include $(top_srcdir)/tools/build/cfa.make
     21
     22DEFAULT_INCLUDES = -I${abs_srcdir}
    2123
    2224debug=yes
     
    3638# since automake doesn't have support for CFA we have to
    3739AM_CFLAGS = $(if $(test), 2> $(test), ) \
     40        -fdebug-prefix-map=$(abspath ${abs_srcdir})= \
     41        -fdebug-prefix-map=/tmp= \
     42        -fno-diagnostics-show-caret \
    3843        -g \
    3944        -Wall \
     
    4247        -DIN_DIR="${abs_srcdir}/.in/"
    4348
     49AM_CFAFLAGS = -XCFA --deterministic-out
     50
    4451# get the desired cfa to test
    4552TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@)
    4653
    4754# adjust CC to current flags
    48 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     55CC = LC_ALL=C $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS} ${AST_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS} ${AST_FLAGS})
    4956CFACC = $(CC)
    5057
     
    5360
    5461# adjusted CC but without the actual distcc call
    55 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     62CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS} ${AST_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS} ${AST_FLAGS})
     63CFACCLINK = $(CFACCLOCAL) -quiet $(if $(test), 2> $(test), ) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g'))
    5664
    5765PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
     
    6068.INTERMEDIATE: .validate .validate.cfa
    6169EXTRA_PROGRAMS = avl_test .dummy_hack # build but do not install
     70EXTRA_DIST = test.py \
     71        pybin/__init__.py \
     72        pybin/print-core.gdb \
     73        pybin/settings.py \
     74        pybin/test_run.py \
     75        pybin/tools.py \
     76        long_tests.hfa \
     77        .in/io.data \
     78        avltree/avl.h \
     79        avltree/avl-private.h \
     80        concurrent/clib.c \
     81        exceptions/with-threads.hfa \
     82        exceptions/except-io.hfa
     83
     84dist-hook:
     85        echo "Gathering test files"
     86        for file in `${TEST_PY} --list-dist`; do \
     87                if test -f ${srcdir}/$${file}; then \
     88                        $(MKDIR_P) $$(dirname ${distdir}/$${file}); \
     89                        cp -df ${srcdir}/$${file} ${distdir}/$${file}; \
     90                fi; \
     91        done
    6292
    6393avl_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
    6494# automake doesn't know we still need C/CPP rules so pretend like we have a C program
    65 _dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp
     95nodist__dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp
    6696
    6797#----------------------------------------------------------------------------------------------------------------
     
    72102        @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    73103
    74 clean-local :
     104mostlyclean-local :
     105        find ${builddir} -not -path './__pycache__/*' -path '*.o' -delete
     106        find ${builddir} -not -path './__pycache__/*' -path '*/.err/*.log' -delete
     107        find ${builddir} -not -path './__pycache__/*' -path '*/.out/*.log' -delete
    75108        rm -f ${EXTRA_PROGRAMS}
     109        rm -rf __pycache__
     110
     111distclean-local :
     112        find ${builddir} -path '*.Po' -delete
    76113
    77114list :
     
    106143% : %.cfa $(CFACCBIN)
    107144        $(CFACOMPILETEST) -c -o $(abspath ${@}).o
    108         $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@})
     145        $(CFACCLINK) ${@}.o -o $(abspath ${@})
     146        rm $(abspath ${@}).o
    109147
    110148# implicit rule for c++ test
     
    125163        $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@})
    126164
    127 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr
    128 EXPECT_STDERR = builtins/sync warnings/self-assignment
    129 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN)
    130         $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
    131 
    132165#------------------------------------------------------------------------------
    133166# CUSTOM TARGET
    134167#------------------------------------------------------------------------------
     168# tests that just validate syntax and compiler output should be compared to stderr
     169CFACOMPILE_SYNTAX = $(CFACOMPILETEST) -Wno-unused-variable -Wno-unused-label -c -fsyntax-only -o $(abspath ${@})
     170
     171SYNTAX_ONLY_CODE = expression typedefRedef variableDeclarator switch numericConstants identFuncDeclarator forall \
     172        init1 limits nested-types stdincludes cast labelledExit array builtins/sync warnings/self-assignment
     173$(SYNTAX_ONLY_CODE): % : %.cfa $(CFACCBIN)
     174        $(CFACOMPILE_SYNTAX)
     175        $(if $(test), cp $(test) $(abspath ${@}), )
     176
    135177# expected failures
    136 # use custom target since they require a custom define and custom dependencies
     178# use custom target since they require a custom define *and* have a name that doesn't match the file
    137179alloc-ERROR : alloc.cfa $(CFACCBIN)
    138         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     180        $(CFACOMPILE_SYNTAX) -DERR1
     181        -cp $(test) $(abspath ${@})
     182
     183init1-ERROR : init1.cfa $(CFACCBIN)
     184        $(CFACOMPILE_SYNTAX) -DERR1
     185        -cp $(test) $(abspath ${@})
    139186
    140187typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN)
    141         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     188        $(CFACOMPILE_SYNTAX) -DERR1
     189        -cp $(test) $(abspath ${@})
    142190
    143191nested-types-ERR1 : nested-types.cfa $(CFACCBIN)
    144         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     192        $(CFACOMPILE_SYNTAX) -DERR1
     193        -cp $(test) $(abspath ${@})
    145194
    146195nested-types-ERR2 : nested-types.cfa $(CFACCBIN)
    147         $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
     196        $(CFACOMPILE_SYNTAX) -DERR2
     197        -cp $(test) $(abspath ${@})
    148198
    149199raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN)
    150         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     200        $(CFACOMPILE_SYNTAX) -DERR1
     201        -cp $(test) $(abspath ${@})
    151202
    152203raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN)
    153         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     204        $(CFACOMPILE_SYNTAX) -DERR1
     205        -cp $(test) $(abspath ${@})
    154206
    155207raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN)
    156         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     208        $(CFACOMPILE_SYNTAX) -DERR1
     209        -cp $(test) $(abspath ${@})
    157210
    158211raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN)
    159         $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
     212        $(CFACOMPILE_SYNTAX) -DERR2
     213        -cp $(test) $(abspath ${@})
     214
     215# Exception Tests
     216# Test with libcfathread; it changes how storage works.
     217
     218exceptions/%-threads : exceptions/%.cfa $(CFACCBIN)
     219        $(CFACOMPILETEST) -include exceptions/with-threads.hfa -c -o $(abspath ${@}).o
     220        $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@})
     221
     222# Linking tests
     223# Meta tests to make sure we see linking errors (can't compile with -O2 since it may multiply number of calls)
     224linking/linkerror : linking/linkerror.cfa $(CFACCBIN)
     225        $(CFACOMPILETEST) -O0 -c -o $(abspath ${@}).o
     226        $(CFACCLINK)  -O0 ${@}.o -o $(abspath ${@})
     227        rm $(abspath ${@}).o
    160228
    161229#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.