source: tests/Makefile.am @ e3a5a73

arm-ehcleanup-dtorsjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-expr
Last change on this file since e3a5a73 was e3a5a73, checked in by tdelisle <tdelisle@…>, 3 years ago

Added defaults for test make command to ease hand testing

  • Property mode set to 100644
File size: 6.1 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=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# implicit rule so not all test require a rule
88% : %.cfa $(CFACC)
89        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
90
91% : %.cpp
92        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
93
94declarationSpecifier: declarationSpecifier.cfa $(CFACC)
95        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
96
97gccExtensions : gccExtensions.cfa $(CFACC)
98        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
99
100extension : extension.cfa $(CFACC)
101        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
102
103attributes : attributes.cfa $(CFACC)
104        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
105
106functions: functions.cfa $(CFACC)
107        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
108
109KRfunctions : KRfunctions.cfa $(CFACC)
110        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
111
112sched-ext-parse : sched-ext-parse.c $(CFACC)
113        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
114
115gmp : gmp.cfa $(CFACC)
116        $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
117
118#builtins
119builtins/sync: builtins/sync.cfa $(CFACC)
120        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
121
122#------------------------------------------------------------------------------
123
124#To make errors path independent we need to cd into the correct directories
125completeTypeError : completeTypeError.cfa $(CFACC)
126        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
127
128typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
129        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
130
131alloc-ERROR: alloc.cfa $(CFACC)
132        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
133
134fallthrough-ERROR: fallthrough.cfa $(CFACC)
135        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
136
137nested-types-ERR1: nested-types.cfa $(CFACC)
138        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
139
140nested-types-ERR2: nested-types.cfa $(CFACC)
141        $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
142
143# Constructor/destructor tests
144raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
145        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
146
147raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
148        $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
149
150raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
151        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
152
153raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
154        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
155
156# Warnings
157warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
158        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
Note: See TracBrowser for help on using the repository browser.