source: tests/Makefile.am @ 933933c

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resnenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 933933c was f7d3215, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Hopefully more robust fix for relative vs absolutepaths in tests

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