source: tests/Makefile.am @ 17a0ede2

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 17a0ede2 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
Line 
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
13## Last Modified On : Tue Nov 20 11:18:51 2018
14## Update Count     : 68
15###############################################################################
16
17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
18ACLOCAL_AMFLAGS  = -I automake
19
20include $(top_srcdir)/src/cfa.make
21
22debug=yes
23installed=no
24
25INSTALL_FLAGS=-in-tree
26DEBUG_FLAGS=-debug -O0
27
28quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
29
30concurrent=
31timeouts=
32
33TEST_PY = python3 ${builddir}/test.py
34
35# applies to both programs
36AM_CFLAGS = $(if $(test), 2> $(test), ) \
37        -g \
38        -Wall \
39        -Wno-unused-function \
40        -quiet @CFA_FLAGS@ \
41        -DIN_DIR="${abs_srcdir}/.in/"
42
43AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
44CC = @CFACC@
45
46PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
47
48.PHONY: list .validate
49.INTERMEDIATE: .validate .validate.cfa
50EXTRA_PROGRAMS = avl_test .dummy_hack # build but do not install
51
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
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
55
56#----------------------------------------------------------------------------------------------------------------
57all-local :
58        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
59
60all-tests :
61        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
62
63clean-local :
64        rm -f ${EXTRA_PROGRAMS}
65
66list :
67        @+${TEST_PY} --list ${concurrent}
68
69.validate: .validate.cfa
70        $(CFACOMPILE) .validate.cfa -fsyntax-only -Wall -Wextra -Werror
71
72.validate.cfa:
73        @echo "int main() { return 0; }" > ${@}
74
75# automake doesn't know we still need C rules so pretend like we have a C program
76.dummy_hack.c:
77        @echo "int main() { return 0; }" > ${@}
78
79.dummy_hackxx.cpp:
80        @echo "int bar() { return 0; }" > ${@}
81
82concurrency :
83        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
84
85#----------------------------------------------------------------------------------------------------------------
86
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'))
89
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 ${@})
92
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 ${@})
95
96#----------------------------------------------------------------------------------------------------------------
97
98# implicit rule so not all test require a rule
99% : %.cfa $(CFACC)
100        $(CFATEST_STDOUT)
101
102% : %.cpp
103        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
104
105#------------------------------------------------------------------------------
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
116
117#------------------------------------------------------------------------------
118# Expected failures
119completeTypeError_FLAGS= -DERR1
120
121#------------------------------------------------------------------------------
122# CUSTOM TARGET
123#------------------------------------------------------------------------------
124typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
125        $(CFATEST_STDOUT) -DERR1
126
127alloc-ERROR: alloc.cfa $(CFACC)
128        $(CFATEST_STDOUT) -DERR1
129
130nested-types-ERR1: nested-types.cfa $(CFACC)
131        $(CFATEST_STDOUT) -DERR1
132
133nested-types-ERR2: nested-types.cfa $(CFACC)
134        $(CFATEST_STDOUT) -DERR2
135
136raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
137        $(CFATEST_STDOUT) -DERR1
138
139raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
140        $(CFATEST_STDOUT) -DERR2
141
142raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
143        $(CFATEST_STDOUT) -DERR1
144
145raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
146        $(CFATEST_STDOUT) -DERR1
147
148#builtins
149builtins/sync: builtins/sync.cfa $(CFACC)
150        $(CFATEST_STDERR) -fsyntax-only
151
152# Warnings
153warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
154        $(CFATEST_STDERR) -fsyntax-only
Note: See TracBrowser for help on using the repository browser.