-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (42 loc) · 1.4 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
54
55
56
SHELL := bash
# [make all] compiles your project.
.PHONY: all
all:
@ dune build --display short src/Main.exe
# [make clean] cleans up.
.PHONY: clean
clean:
@ rm -rf _build
@ git clean -fX
# Settings for the tests that follow.
COMMAND := ./main.sh
# [make test] combines [make human] and [make auto].
.PHONY: test
test:
@ make human
@ make auto
# [make human] processes every file of the form test/input/*.s
# using the command $(COMMAND) defined above.
.PHONY: human
human: all
@ echo "Running human-written tests..."
@ $(patsubst %,$(COMMAND) % &&, $(wildcard test/inputs/*.s)) true
# [make auto] processes a number of randomly-generated programs
# of increasing sizes, and stops at the first failure, displaying
# an error message.
.PHONY: auto
auto: all
@ echo "Running randomly-generated tests..."
@ $(COMMAND) --budget 100
# [make auto_resilient] processes a number of randomly-generated
# programs of increasing sizes and does not stop at the first failure.
# The total number of failures is reported instead.
.PHONY: auto_resilient
auto_resilient: all
@ echo "Running randomly-generated tests (in resilient mode)..."
@ $(COMMAND) --budget 100 --resilient
# [make typeset] creates the file sujet/simple.txt,
# fragments of which are read by LaTeX while typesetting the assignment.
.PHONY: typeset
typeset: all
@ $(COMMAND) --show-surface --show-linear --mark test/inputs/simple.s > sujet/simple.txt