source: tests/Makefile.am @ 33c3ded

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 33c3ded was fe94e708, checked in by Thierry Delisle <tdelisle@…>, 4 years ago

Added missing quiet flag

  • Property mode set to 100644
File size: 7.0 KB
RevLine 
[ef7d253]1######################## -*- Mode: Makefile-Automake -*- ######################
2##
3## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
4##
5## The contents of this file are covered under the licence agreement in the
6## file "LICENCE" distributed with Cforall.
7##
8## Makefile.am --
9##
10## Author           : Peter A. Buhr
11## Created On       : Sun May 31 09:08:15 2015
12## Last Modified By : Peter A. Buhr
[3d99498]13## Last Modified On : Tue Nov 20 11:18:51 2018
14## Update Count     : 68
[ef7d253]15###############################################################################
16
[0c1b566]17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
[107b01a]18ACLOCAL_AMFLAGS  = -I automake
[f85bc15]19
[bcadb26]20include $(top_srcdir)/tools/build/cfa.make
[dc8511c]21
[74cfe054]22DEFAULT_INCLUDES = -I${abs_srcdir}
23
[cc640aad]24debug=yes
[ff593a3]25installed=no
[dcfedca]26archiveerrors=
[cc640aad]27
[e3a5a73]28DEBUG_FLAGS=-debug -O0
29
[5cacf74]30quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
[be65cca]31
[0ad0c55]32concurrent=
[b90aace]33timeouts=
[be65cca]34
[5b993e0]35TEST_PY = python3 ${builddir}/test.py
[f85bc15]36
[ef7d253]37# applies to both programs
[d65f92c]38# since automake doesn't have support for CFA we have to
[b8f6002]39AM_CFLAGS = $(if $(test), 2> $(test), ) \
[87fc1b4]40        -fdebug-prefix-map=$(abspath ${abs_srcdir})= \
41        -fdebug-prefix-map=/tmp= \
[b8f6002]42        -g \
43        -Wall \
44        -Wno-unused-function \
45        -quiet @CFA_FLAGS@ \
[f806b61]46        -DIN_DIR="${abs_srcdir}/.in/"
[7c03d6d]47
[7215000]48AM_CFAFLAGS = -XCFA --deterministic-out
49
[158b026]50# get the desired cfa to test
51TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@)
52
[34e1494]53# adjust CC to current flags
[ee0bfa9]54CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
[d65f92c]55CFACC = $(CC)
[ef7d253]56
[34e1494]57# get local binary for depedencies
58CFACCBIN = @CFACC@
59
60# adjusted CC but without the actual distcc call
[ee0bfa9]61CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
[fe94e708]62CFACCLINK = $(CFACCLOCAL) -quiet $(if $(test), 2> $(test), ) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g'))
[34e1494]63
[e16797c]64PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
[f7d3215]65
[28582b2]66.PHONY: list .validate
[1e995d6]67.INTERMEDIATE: .validate .validate.cfa
[107b01a]68EXTRA_PROGRAMS = avl_test .dummy_hack # build but do not install
[44f44617]69
[107b01a]70avl_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
[2b10f95]71# automake doesn't know we still need C/CPP rules so pretend like we have a C program
[b7fe2e6]72nodist__dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp
[a0dcd2e]73
[73abe95]74#----------------------------------------------------------------------------------------------------------------
[927e9ce]75all-local :
[5c4a473]76        @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
[df42128]77
78all-tests :
[5c4a473]79        @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
[927e9ce]80
81clean-local :
[a6dd5b0]82        rm -f ${EXTRA_PROGRAMS}
[927e9ce]83
84list :
[f85bc15]85        @+${TEST_PY} --list ${concurrent}
[927e9ce]86
[1e995d6]87.validate: .validate.cfa
88        $(CFACOMPILE) .validate.cfa -fsyntax-only -Wall -Wextra -Werror
89
90.validate.cfa:
91        @echo "int main() { return 0; }" > ${@}
[28582b2]92
[107b01a]93# automake doesn't know we still need C rules so pretend like we have a C program
94.dummy_hack.c:
[28582b2]95        @echo "int main() { return 0; }" > ${@}
96
[2b10f95]97.dummy_hackxx.cpp:
98        @echo "int bar() { return 0; }" > ${@}
99
[026a0f5]100concurrency :
[a5121bf]101        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
[026a0f5]102
[73abe95]103#----------------------------------------------------------------------------------------------------------------
[dc8511c]104
[e16797c]105# Use for all tests, make sure the path are correct and all flags are added
[34e1494]106CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g'))
[d9b499c]107
[e16797c]108#----------------------------------------------------------------------------------------------------------------
[a843067]109
[e16797c]110# implicit rule so not all test require a rule
[15f9c8e]111# split into two steps to support compiling remotely using distcc
[34e1494]112# don't use distcc to do the linking because distcc doesn't do linking
[d65f92c]113% : %.cfa $(CFACCBIN)
[7009b9b]114        $(CFACOMPILETEST) -c -o $(abspath ${@}).o
[673eb7a]115        $(CFACCLINK) ${@}.o -o $(abspath ${@})
[468c5aa]116        rm $(abspath ${@}).o
[f7d3215]117
[34e1494]118# implicit rule for c++ test
119# convient for testing the testsuite itself but not actuall used
[e16797c]120% : %.cpp
121        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[4c8f86b3]122
[f7d3215]123#------------------------------------------------------------------------------
[34e1494]124# TARGETS WITH CUSTOM FLAGS
[e16797c]125#------------------------------------------------------------------------------
[34e1494]126# custom libs
127gmp_FLAGSLD= -lgmp
[dc8511c]128
[e16797c]129#------------------------------------------------------------------------------
[34e1494]130# Generated code
131GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions
132$(GENERATED_CODE): % : %.cfa $(CFACCBIN)
133        $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@})
134
135# Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr
136EXPECT_STDERR = builtins/sync warnings/self-assignment
137$(EXPECT_STDERR): % : %.cfa $(CFACCBIN)
138        $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
[486341f]139
[e16797c]140#------------------------------------------------------------------------------
141# CUSTOM TARGET
142#------------------------------------------------------------------------------
[87fc1b4]143# tests that just validate syntax
144expression : expression.cfa $(CFACCBIN)
[2aa25cc2]145        $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
[87fc1b4]146
[34e1494]147# expected failures
148# use custom target since they require a custom define and custom dependencies
149alloc-ERROR : alloc.cfa $(CFACCBIN)
150        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
[b93a3de]151
[34e1494]152typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN)
153        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
[e2c70ab]154
[34e1494]155nested-types-ERR1 : nested-types.cfa $(CFACCBIN)
156        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
[49e1275]157
[34e1494]158nested-types-ERR2 : nested-types.cfa $(CFACCBIN)
159        $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
[49e1275]160
[34e1494]161raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN)
162        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
[cdbfab0]163
[34e1494]164raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN)
165        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
[80e8582]166
[34e1494]167raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN)
168        $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
[80e8582]169
[34e1494]170raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN)
171        $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
[e16797c]172
[5715d43]173# Exception Tests
174# Test with libcfathread; it changes how storage works.
175
176exceptions/%-threads : exceptions/%.cfa $(CFACCBIN)
177        $(CFACOMPILETEST) -include exceptions/with-threads.hfa -c -o $(abspath ${@}).o
178        $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@})
179
[673eb7a]180# Linking tests
181# Meta tests to make sure we see linking errors (can't compile with -O2 since it may multiply number of calls)
182linking/linkerror : linking/linkerror.cfa $(CFACCBIN)
183        $(CFACOMPILETEST) -O0 -c -o $(abspath ${@}).o
184        $(CFACCLINK)  -O0 ${@}.o -o $(abspath ${@})
[a951171]185        rm $(abspath ${@}).o
[673eb7a]186
[34e1494]187#------------------------------------------------------------------------------
188# Other targets
Note: See TracBrowser for help on using the repository browser.