source: tests/Makefile.am @ 2185df1

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resnenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 2185df1 was dc8511c, checked in by Peter A. Buhr <pabuhr@…>, 5 years ago

first attempt at updating suffixes for test programs

  • Property mode set to 100644
File size: 5.4 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 : Wed Nov  7 12:03:29 2018
14## Update Count     : 59
15###############################################################################
16
17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
18
19include $(top_srcdir)/src/cfa.make
20
21debug=yes
22installed=no
23
24quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
25
26concurrent=
27timeouts=
28
29TEST_PY = python ${builddir}/test.py
30
31# applies to both programs
32AM_CFLAGS = $(if $(test), 2> $(test), ) \
33        -g \
34        -Wall \
35        -Wno-unused-function \
36        -quiet @CFA_FLAGS@ \
37        -DIN_DIR="${srcdir}/.in/"
38
39AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
40
41CC = @CFACC@
42
43PRETTY_PATH=cd ${srcdir} &&
44
45.PHONY: list .validate
46.INTERMEDIATE: .validate .validate.c
47EXTRA_PROGRAMS = fstream_test avl_test # build but do not install
48
49fstream_test_SOURCES = fstream_test.cfa
50
51avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
52
53#----------------------------------------------------------------------------------------------------------------
54all-local :
55        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
56
57all-tests :
58        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
59
60clean-local :
61        rm -f ${EXTRA_PROGRAMS}
62
63list :
64        @+${TEST_PY} --list ${concurrent}
65
66.validate: .validate.c
67        $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror
68
69.validate.c:
70        @echo "int main() { return 0; }" > ${@}
71
72concurrency :
73        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
74
75#----------------------------------------------------------------------------------------------------------------
76
77# implicit rule so not all test require a rule
78% : %.c $(CC)
79        $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
80
81declarationSpecifier: declarationSpecifier.cfa $(CC)
82        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
83
84gccExtensions : gccExtensions.cfa $(CC)
85        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
86
87extension : extension.cfa $(CC)
88        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
89
90attributes : attributes.cfa $(CC)
91        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
92
93functions: functions.cfa $(CC)
94        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
95
96KRfunctions : KRfunctions.cfa $(CC)
97        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
98
99sched-ext-parse : sched-ext-parse.c $(CC)
100        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
101
102gmp : gmp.cfa $(CC)
103        $(PRETTY_PATH) $(COMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
104
105#builtins
106builtins/sync: builtins/sync.c $(CC)
107        $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
108
109#------------------------------------------------------------------------------
110
111#To make errors path independent we need to cd into the correct directories
112completeTypeError : completeTypeError.cfa $(CC)
113        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
114
115typedefRedef-ERR1: typedefRedef.cfa $(CC)
116        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
117
118alloc-ERROR: alloc.cfa $(CC)
119        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
120
121fallthrough-ERROR: fallthrough.cfa $(CC)
122        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
123
124nested-types-ERR1: nested-types.cfa $(CC)
125        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
126
127nested-types-ERR2: nested-types.cfa $(CC)
128        $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
129
130# Constructor/destructor tests
131raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC)
132        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
133
134raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC)
135        $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
136
137raii/memberCtors-ERR1: raii/memberCtors.c $(CC)
138        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
139
140raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC)
141        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
142
143# Warnings
144warnings/self-assignment: warnings/self-assignment.c $(CC)
145        $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
Note: See TracBrowser for help on using the repository browser.