source: tests/Makefile.am @ a5121bf

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexer
Last change on this file since a5121bf was a5121bf, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Tests can now be run from installed binaries or tree binaries

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