source: tests/Makefile.am @ 305581d

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resnenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 305581d 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
RevLine 
[ef7d253]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
[2248dc7]13## Last Modified On : Wed Jun  6 16:42:20 2018
14## Update Count     : 49
[ef7d253]15###############################################################################
16
[0c1b566]17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
[f85bc15]18
[cc640aad]19debug=yes
[ff593a3]20installed=no
[cc640aad]21
[5cacf74]22quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
[be65cca]23
[0ad0c55]24concurrent=
[be65cca]25
[bdff89d]26TEST_PY = python ${builddir}/test.py
[f85bc15]27
[ef7d253]28# applies to both programs
[b8f6002]29AM_CFLAGS = $(if $(test), 2> $(test), ) \
30        -g \
31        -Wall \
32        -Wno-unused-function \
33        -quiet @CFA_FLAGS@ \
[a5121bf]34        -DIN_DIR="${srcdir}/.in/"
[7c03d6d]35
[575a6e5]36AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
[b5f9829]37
[50697b0]38CC = @CFACC@
[ef7d253]39
[f7d3215]40PRETTY_PATH=cd ${srcdir} &&
41
[28582b2]42.PHONY: list .validate
43.INTERMEDIATE: .validate .validate.c
[293377c]44EXTRA_PROGRAMS = fstream_test avl_test # build but do not install
[927e9ce]45
[e68b3a8]46fstream_test_SOURCES = fstream_test.c
[44f44617]47
[e68b3a8]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
[a0dcd2e]49
[73abe95]50#----------------------------------------------------------------------------------------------------------------
[927e9ce]51all-local :
[a5121bf]52        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${quick_test}
[df42128]53
54all-tests :
[a5121bf]55        @+${TEST_PY} --all --debug=${debug}  --install=${installed} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
[927e9ce]56
57clean-local :
[a6dd5b0]58        rm -f ${EXTRA_PROGRAMS}
[927e9ce]59
60list :
[f85bc15]61        @+${TEST_PY} --list ${concurrent}
[927e9ce]62
[28582b2]63.validate: .validate.c
[575a6e5]64        $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror
[28582b2]65
66.validate.c:
67        @echo "int main() { return 0; }" > ${@}
68
[026a0f5]69concurrency :
[a5121bf]70        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
[026a0f5]71
[73abe95]72#----------------------------------------------------------------------------------------------------------------
[4f18de3]73# implicit rule so not all test require a rule
[b8f6002]74% : %.c $(CC)
[f7d3215]75        $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[8f8af30]76
[b8f6002]77declarationSpecifier: declarationSpecifier.c $(CC)
[f7d3215]78        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[950f7a7]79
[b8f6002]80gccExtensions : gccExtensions.c $(CC)
[f7d3215]81        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[d9b499c]82
[b8f6002]83extension : extension.c $(CC)
[f7d3215]84        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[d9b499c]85
[b8f6002]86attributes : attributes.c $(CC)
[f7d3215]87        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[481115f]88
[b8f6002]89functions: functions.c $(CC)
[f7d3215]90        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[c0aa336]91
[b8f6002]92KRfunctions : KRfunctions.c $(CC)
[f7d3215]93        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[3a5131ed]94
[b8f6002]95sched-ext-parse : sched-ext-parse.c $(CC)
[f7d3215]96        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[a843067]97
[b8f6002]98gmp : gmp.c $(CC)
[f7d3215]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
[4c8f86b3]104
[f7d3215]105#------------------------------------------------------------------------------
106#To make errors path independent we need to cd into the correct directories
[b8f6002]107completeTypeError : completeTypeError.c $(CC)
[f7d3215]108        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[486341f]109
[b8f6002]110typedefRedef-ERR1: typedefRedef.c $(CC)
[f7d3215]111        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[b93a3de]112
[b8f6002]113alloc-ERROR: alloc.c $(CC)
[f7d3215]114        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[70529dc]115
[b8f6002]116fallthrough-ERROR: fallthrough.c $(CC)
[f7d3215]117        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[e2c70ab]118
[b8f6002]119nested-types-ERR1: nested-types.c $(CC)
[f7d3215]120        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[49e1275]121
[b8f6002]122nested-types-ERR2: nested-types.c $(CC)
[f7d3215]123        $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[49e1275]124
[80e8582]125# Constructor/destructor tests
[b8f6002]126raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC)
[f7d3215]127        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[cdbfab0]128
[b8f6002]129raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC)
[f7d3215]130        $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[80e8582]131
[b8f6002]132raii/memberCtors-ERR1: raii/memberCtors.c $(CC)
[f7d3215]133        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[80e8582]134
[b8f6002]135raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC)
[f7d3215]136        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
[80e8582]137
[1feb535f]138# Warnings
[b8f6002]139warnings/self-assignment: warnings/self-assignment.c $(CC)
[f7d3215]140        $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
Note: See TracBrowser for help on using the repository browser.