Changeset d65f92c for tests/Makefile.in


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.in

    r1ee048fd rd65f92c  
    212212AWK = @AWK@
    213213BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
    214 CC = @CFACC@
     214CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
    215215CCAS = @CCAS@
    216216CCASDEPMODE = @CCASDEPMODE@
    217217CCASFLAGS = @CCASFLAGS@
    218218CCDEPMODE = @CCDEPMODE@
    219 CFACC = @CFACC@
     219CFACC = $(CC)
    220220CFACPP = @CFACPP@
    221221CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    248248FGREP = @FGREP@
    249249GREP = @GREP@
     250HAS_DISTCC = @HAS_DISTCC@
    250251HOST_FLAGS = @HOST_FLAGS@
    251252INSTALL = @INSTALL@
     
    385386
    386387# applies to both programs
    387 AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \
    388         -quiet @CFA_FLAGS@ -DIN_DIR="${abs_srcdir}/.in/" \
    389         ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
     388# since automake doesn't have support for CFA we have to
     389AM_CFLAGS = $(if $(test), 2> $(test), ) \
     390        -g \
     391        -Wall \
     392        -Wno-unused-function \
     393        -quiet @CFA_FLAGS@ \
     394        -DIN_DIR="${abs_srcdir}/.in/"
     395
     396CFACCBIN = @CFACC@
    390397PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    391398avl_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
     
    396403
    397404# Use for all tests, make sure the path are correct and all flags are added
    398 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
    399 
    400 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail
     405CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) -c $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
     406
     407# Use for tests that either generate an executable, print directly to stdout or the make command is expected to fail
    401408CFATEST_STDOUT = $(CFACOMPILETEST) -o $(abspath ${@})
    402409
     
    770777#----------------------------------------------------------------------------------------------------------------
    771778all-local :
    772         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
     779        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test}
    773780
    774781all-tests :
    775         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     782        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    776783
    777784clean-local :
     
    800807
    801808# implicit rule so not all test require a rule
    802 % : %.cfa $(CFACC)
    803         $(CFATEST_STDOUT)
     809% : %.cfa $(CFACCBIN)
     810        $(CFACOMPILETEST) -o $(abspath ${@}).o
     811        $(CFACC) $(abspath ${@}).o -o $(abspath ${@})
    804812
    805813% : %.cpp
     
    809817# CUSTOM TARGET
    810818#------------------------------------------------------------------------------
    811 typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
     819typedefRedef-ERR1: typedefRedef.cfa $(CFACCBIN)
    812820        $(CFATEST_STDOUT) -DERR1
    813821
    814 alloc-ERROR: alloc.cfa $(CFACC)
     822alloc-ERROR: alloc.cfa $(CFACCBIN)
    815823        $(CFATEST_STDOUT) -DERR1
    816824
    817 nested-types-ERR1: nested-types.cfa $(CFACC)
     825nested-types-ERR1: nested-types.cfa $(CFACCBIN)
    818826        $(CFATEST_STDOUT) -DERR1
    819827
    820 nested-types-ERR2: nested-types.cfa $(CFACC)
     828nested-types-ERR2: nested-types.cfa $(CFACCBIN)
    821829        $(CFATEST_STDOUT) -DERR2
    822830
    823 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
     831raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACCBIN)
    824832        $(CFATEST_STDOUT) -DERR1
    825833
    826 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
     834raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACCBIN)
    827835        $(CFATEST_STDOUT) -DERR2
    828836
    829 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
     837raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACCBIN)
    830838        $(CFATEST_STDOUT) -DERR1
    831839
    832 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
     840raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACCBIN)
    833841        $(CFATEST_STDOUT) -DERR1
    834842
    835843#builtins
    836 builtins/sync: builtins/sync.cfa $(CFACC)
     844builtins/sync: builtins/sync.cfa $(CFACCBIN)
    837845        $(CFATEST_STDERR) -fsyntax-only
    838846
    839847# Warnings
    840 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
     848warnings/self-assignment: warnings/self-assignment.cfa $(CFACCBIN)
    841849        $(CFATEST_STDERR) -fsyntax-only
    842850
Note: See TracChangeset for help on using the changeset viewer.