source: tests/Makefile.am @ ce12e2b

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since ce12e2b was 8c3a0336, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Merge branch 'master' into ctxswitch

  • Property mode set to 100644
File size: 5.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
[dc8511c]20include $(top_srcdir)/src/cfa.make
21
[cc640aad]22debug=yes
[ff593a3]23installed=no
[cc640aad]24
[e3a5a73]25INSTALL_FLAGS=-in-tree
26DEBUG_FLAGS=-debug -O0
27
[5cacf74]28quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
[be65cca]29
[0ad0c55]30concurrent=
[b90aace]31timeouts=
[be65cca]32
[5b993e0]33TEST_PY = python3 ${builddir}/test.py
[f85bc15]34
[ef7d253]35# applies to both programs
[b8f6002]36AM_CFLAGS = $(if $(test), 2> $(test), ) \
37        -g \
38        -Wall \
39        -Wno-unused-function \
40        -quiet @CFA_FLAGS@ \
[f806b61]41        -DIN_DIR="${abs_srcdir}/.in/"
[7c03d6d]42
[575a6e5]43AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
[50697b0]44CC = @CFACC@
[ef7d253]45
[e16797c]46PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
[f7d3215]47
[28582b2]48.PHONY: list .validate
[1e995d6]49.INTERMEDIATE: .validate .validate.cfa
[107b01a]50EXTRA_PROGRAMS = avl_test .dummy_hack # build but do not install
[44f44617]51
[107b01a]52avl_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]53# automake doesn't know we still need C/CPP rules so pretend like we have a C program
54_dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp
[a0dcd2e]55
[73abe95]56#----------------------------------------------------------------------------------------------------------------
[927e9ce]57all-local :
[b90aace]58        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
[df42128]59
60all-tests :
[b90aace]61        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
[927e9ce]62
63clean-local :
[a6dd5b0]64        rm -f ${EXTRA_PROGRAMS}
[927e9ce]65
66list :
[f85bc15]67        @+${TEST_PY} --list ${concurrent}
[927e9ce]68
[1e995d6]69.validate: .validate.cfa
70        $(CFACOMPILE) .validate.cfa -fsyntax-only -Wall -Wextra -Werror
71
72.validate.cfa:
73        @echo "int main() { return 0; }" > ${@}
[28582b2]74
[107b01a]75# automake doesn't know we still need C rules so pretend like we have a C program
76.dummy_hack.c:
[28582b2]77        @echo "int main() { return 0; }" > ${@}
78
[2b10f95]79.dummy_hackxx.cpp:
80        @echo "int bar() { return 0; }" > ${@}
81
[026a0f5]82concurrency :
[a5121bf]83        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
[026a0f5]84
[73abe95]85#----------------------------------------------------------------------------------------------------------------
[dc8511c]86
[e16797c]87# Use for all tests, make sure the path are correct and all flags are added
88CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
[950f7a7]89
[e16797c]90# Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail
91CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@})
[d9b499c]92
[e16797c]93# Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr
94CFATEST_STDERR=$(CFACOMPILETEST) 2> $(abspath ${@})
[d9b499c]95
[e16797c]96#----------------------------------------------------------------------------------------------------------------
[a843067]97
[e16797c]98# implicit rule so not all test require a rule
99% : %.cfa $(CFACC)
100        $(CFATEST_STDOUT)
[f7d3215]101
[e16797c]102% : %.cpp
103        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[4c8f86b3]104
[f7d3215]105#------------------------------------------------------------------------------
[e16797c]106# TARGET WITH STANDARD RULE BUT CUSTOM FLAGS
107#------------------------------------------------------------------------------
108# Expected failures
109declarationSpecifier_FLAGS= -CFA -XCFA -p
110gccExtensions_FLAGS= -CFA -XCFA -p
111extension_FLAGS= -CFA -XCFA -p
112attributes_FLAGS= -CFA -XCFA -p
113functions_FLAGS= -CFA -XCFA -p
114KRfunctions_FLAGS= -CFA -XCFA -p
115gmp_FLAGS= -lgmp
[dc8511c]116
[e16797c]117#------------------------------------------------------------------------------
118# Expected failures
119completeTypeError_FLAGS= -DERR1
[486341f]120
[e16797c]121#------------------------------------------------------------------------------
122# CUSTOM TARGET
123#------------------------------------------------------------------------------
[1e995d6]124typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
[e16797c]125        $(CFATEST_STDOUT) -DERR1
[b93a3de]126
[1e995d6]127alloc-ERROR: alloc.cfa $(CFACC)
[e16797c]128        $(CFATEST_STDOUT) -DERR1
[e2c70ab]129
[1e995d6]130nested-types-ERR1: nested-types.cfa $(CFACC)
[e16797c]131        $(CFATEST_STDOUT) -DERR1
[49e1275]132
[1e995d6]133nested-types-ERR2: nested-types.cfa $(CFACC)
[e16797c]134        $(CFATEST_STDOUT) -DERR2
[49e1275]135
[107b01a]136raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
[e16797c]137        $(CFATEST_STDOUT) -DERR1
[cdbfab0]138
[107b01a]139raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
[e16797c]140        $(CFATEST_STDOUT) -DERR2
[80e8582]141
[107b01a]142raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
[e16797c]143        $(CFATEST_STDOUT) -DERR1
[80e8582]144
[107b01a]145raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
[e16797c]146        $(CFATEST_STDOUT) -DERR1
147
148#builtins
149builtins/sync: builtins/sync.cfa $(CFACC)
150        $(CFATEST_STDERR) -fsyntax-only
[80e8582]151
[1feb535f]152# Warnings
[107b01a]153warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
[e16797c]154        $(CFATEST_STDERR) -fsyntax-only
Note: See TracBrowser for help on using the repository browser.