Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.in

    re16797c rf806b61  
    384384        -quiet @CFA_FLAGS@ -DIN_DIR="${abs_srcdir}/.in/" \
    385385        ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
    386 PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
     386PRETTY_PATH = cd ${srcdir} &&
    387387avl_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
    388388# automake doesn't know we still need C/CPP rules so pretend like we have a C program
    389389_dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp
    390 
    391 #----------------------------------------------------------------------------------------------------------------
    392 
    393 # Use for all tests, make sure the path are correct and all flags are added
    394 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
    395 
    396 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail
    397 CFATEST_STDOUT = $(CFACOMPILETEST) -o $(abspath ${@})
    398 
    399 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr
    400 CFATEST_STDERR = $(CFACOMPILETEST) 2> $(abspath ${@})
    401 
    402 #------------------------------------------------------------------------------
    403 # TARGET WITH STANDARD RULE BUT CUSTOM FLAGS
    404 #------------------------------------------------------------------------------
    405 # Expected failures
    406 declarationSpecifier_FLAGS = -CFA -XCFA -p
    407 gccExtensions_FLAGS = -CFA -XCFA -p
    408 extension_FLAGS = -CFA -XCFA -p
    409 attributes_FLAGS = -CFA -XCFA -p
    410 functions_FLAGS = -CFA -XCFA -p
    411 KRfunctions_FLAGS = -CFA -XCFA -p
    412 gmp_FLAGS = -lgmp
    413 
    414 #------------------------------------------------------------------------------
    415 # Expected failures
    416 completeTypeError_FLAGS = -DERR1
    417390all: all-am
    418391
     
    797770# implicit rule so not all test require a rule
    798771% : %.cfa $(CFACC)
    799         $(CFATEST_STDOUT)
     772        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    800773
    801774% : %.cpp
    802775        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    803776
    804 #------------------------------------------------------------------------------
    805 # CUSTOM TARGET
    806 #------------------------------------------------------------------------------
    807 typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
    808         $(CFATEST_STDOUT) -DERR1
    809 
    810 alloc-ERROR: alloc.cfa $(CFACC)
    811         $(CFATEST_STDOUT) -DERR1
    812 
    813 nested-types-ERR1: nested-types.cfa $(CFACC)
    814         $(CFATEST_STDOUT) -DERR1
    815 
    816 nested-types-ERR2: nested-types.cfa $(CFACC)
    817         $(CFATEST_STDOUT) -DERR2
    818 
    819 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
    820         $(CFATEST_STDOUT) -DERR1
    821 
    822 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
    823         $(CFATEST_STDOUT) -DERR2
    824 
    825 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
    826         $(CFATEST_STDOUT) -DERR1
    827 
    828 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
    829         $(CFATEST_STDOUT) -DERR1
     777declarationSpecifier: declarationSpecifier.cfa $(CFACC)
     778        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     779
     780gccExtensions : gccExtensions.cfa $(CFACC)
     781        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     782
     783extension : extension.cfa $(CFACC)
     784        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     785
     786attributes : attributes.cfa $(CFACC)
     787        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     788
     789functions: functions.cfa $(CFACC)
     790        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     791
     792KRfunctions : KRfunctions.cfa $(CFACC)
     793        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     794
     795sched-ext-parse : sched-ext-parse.c $(CFACC)
     796        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     797
     798gmp : gmp.cfa $(CFACC)
     799        $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    830800
    831801#builtins
    832802builtins/sync: builtins/sync.cfa $(CFACC)
    833         $(CFATEST_STDERR) -fsyntax-only
     803        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
     804
     805#------------------------------------------------------------------------------
     806
     807#To make errors path independent we need to cd into the correct directories
     808completeTypeError : completeTypeError.cfa $(CFACC)
     809        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     810
     811typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
     812        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     813
     814alloc-ERROR: alloc.cfa $(CFACC)
     815        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     816
     817fallthrough-ERROR: fallthrough.cfa $(CFACC)
     818        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     819
     820nested-types-ERR1: nested-types.cfa $(CFACC)
     821        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     822
     823nested-types-ERR2: nested-types.cfa $(CFACC)
     824        $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     825
     826# Constructor/destructor tests
     827raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
     828        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     829
     830raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
     831        $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     832
     833raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
     834        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     835
     836raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
     837        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    834838
    835839# Warnings
    836840warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
    837         $(CFATEST_STDERR) -fsyntax-only
     841        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
    838842
    839843# Tell versions [3.59,3.63) of GNU make to not export all variables.
Note: See TracChangeset for help on using the changeset viewer.