source: longrun_tests/Makefile.am @ 9d5eacb

Last change on this file since 9d5eacb was 850aff1, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Added -Werror=return-type EVERYWHERE!
Added -Wextra in some places.

  • Property mode set to 100644
File size: 2.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           : Thierry Delisle
11## Created On       : Fri Jun 16 10:57:34 2017
12## Last Modified By :
13## Last Modified On :
14## Update Count     : 0
15###############################################################################
16
17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
18ACLOCAL_AMFLAGS  = -I automake
19
20include $(top_srcdir)/tools/build/cfa.make
21
22repeats=10
23max_time=600
24preempt=10ul\`ms
25debug=-debug
26type=LONG
27
28REPEAT = $(abs_top_builddir)/tools/repeat
29WATCHDOG = $(abs_top_builddir)/tools/watchdog
30TIME = /usr/bin/time -f "%E"
31
32UPDATED_TYPE = $(shell $(srcdir)/update-type $(type))
33
34BUILD_FLAGS =
35AM_CFAFLAGS = \
36        -g \
37        -Wall \
38        -Wextra \
39        -Werror=return-type
40        -Wno-unused-function \
41        -quiet \
42        -O2 \
43        -DPREEMPTION_RATE=$(preempt) \
44        -I$(abs_top_srcdir)/tests \
45        -I$(srcdir) \
46        -DTEST_$(shell cat .type | tr a-z A-Z)
47
48TESTS = block coroutine create disjoint enter enter3 locks processor stack wait yield
49
50# .INTERMEDIATE: $(TESTS)
51
52all-local: $(TESTS:=.run)
53
54runall : $(TESTS:=.run)
55        @ echo "All programs terminated normally"
56
57watchall : $(TESTS:=.watch)
58        @ echo "All programs terminated normally"
59
60compileall : $(TESTS)
61        @ echo "Compiled"
62
63clean-local:
64        rm -f $(TESTS) core* out.log .type
65
66% : %.cfa $(CFACC) $(UPDATED_TYPE)
67        $(AM_V_CFA)$(CFACOMPILE) $(<) $(debug) -o $(@)
68
69%.run : % $(REPEAT)
70        @ time $(REPEAT) -r out.log -i -s $(repeats) timeout $(max_time) ./$(<)
71        @ rm $(<)
72        @ echo -e "$(<): SUCCESS\n"
73
74%.watch : % $(WATCHDOG)
75        @ time $(WATCHDOG} ./$(<)
76        @ rm $(<)
77        @ echo -e "$(<): SUCCESS\n"
78
79%.time : % $(REPEAT)
80        @ $(REPEAT) -i -s -- $(repeats) $(TIME) -a -o times.log ./$(<)
81        @ rm $(<)
82        @ echo -e "$(<): SUCCESS\n"
83
84$(REPEAT): $(abs_top_builddir)/tools/Makefile
85        @+make -C $(abs_top_builddir)/tools/
86
87$(WATCHDOG): $(abs_top_builddir)/tools/Makefile
88        @+make -C $(abs_top_builddir)/tools/
Note: See TracBrowser for help on using the repository browser.