-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathMakefile
53 lines (48 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# For the best possible utilisation of multiple cores when
# running tests in parallel, it is important that these directories are
# listed with decreasing runtimes (i.e. longest running at the top)
DIRS = janalyzer \
janalyzer-taint \
jbmc \
jbmc-concurrency \
jbmc-inheritance \
jbmc-json-ui \
jbmc-strings \
jdiff \
strings-smoke-tests \
jbmc-generics \
# Empty last line
# Run all test directories in sequence
.PHONY: test
test:
mvn --quiet clean package -T1C
@for dir in $(DIRS); do \
$(MAKE) "$$dir" || exit 1; \
done;
# Pattern to execute a single test suite directory
.PHONY: $(DIRS)
$(DIRS):
@echo "Running $@..." ;
$(MAKE) -C "$@" test || exit 1;
# Run all test directories using GNU Parallel
.PHONY: test-parallel
.NOTPARALLEL: test-parallel
test-parallel:
mvn --quiet clean package -T1C
@echo "Building with $(JOBS) jobs"
parallel \
--halt soon,fail=1 \
--tag \
--tagstring '{#}:' \
--linebuffer \
--jobs $(JOBS) \
$(MAKE) "{}" \
::: $(DIRS)
.PHONY: clean
clean:
mvn --quiet clean -T1C
@for dir in *; do \
if [ -d "$$dir" ]; then \
$(MAKE) -C "$$dir" clean; \
fi; \
done;