forked from kaist-plrg/rust-spectec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
104 lines (81 loc) · 2.62 KB
/
Makefile
File metadata and controls
104 lines (81 loc) · 2.62 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
NAME = spectec-core
# Compile
.PHONY: exe
EXESPEC = spectec/_build/default/bin/main.exe
exe:
rm -f ./$(NAME)
opam switch 5.1.0
cd spectec && opam exec -- dune build bin/main.exe && echo
ln -f $(EXESPEC) ./$(NAME)
# Format
.PHONY: fmt
fmt:
opam switch 5.1.0
cd spectec && opam exec dune fmt
# Tests
#
# Individual tests:
# make test-elab - Elaboration test
# make test-struct - Structuring test
# make test-il-pos - IL interpreter positive tests (slow)
# make test-il-neg - IL interpreter negative tests
# make test-sl-pos - SL interpreter positive tests (slow)
# make test-sl-neg - SL interpreter negative tests
#
# Grouped tests:
# make test-quick - Fast tests only (elab + struct)
# make test-il - All IL tests (pos + neg)
# make test-sl - All SL tests (pos + neg)
# make test - All tests
.PHONY: test test-quick test-elab test-struct
.PHONY: test-il test-il-pos test-il-neg
.PHONY: test-sl test-sl-pos test-sl-neg
.PHONY: promote
test-elab:
@echo "#### Running elaboration test"
@opam switch 5.1.0
@cd spectec && opam exec -- dune build @test/elab/runtest --profile=release && echo OK
test-struct:
@echo "#### Running structuring test"
@opam switch 5.1.0
@cd spectec && opam exec -- dune build @test/struct/runtest --profile=release && echo OK
test-il-pos:
@echo "#### Running IL interpreter positive tests"
@opam switch 5.1.0
@cd spectec && opam exec -- dune build @test/interp/il-pos --profile=release
@cat spectec/_build/default/test/interp/il-pos.err >&2
@echo OK
test-il-neg:
@echo "#### Running IL interpreter negative tests"
@opam switch 5.1.0
@cd spectec && opam exec -- dune build @test/interp/il-neg --profile=release
@cat spectec/_build/default/test/interp/il-neg.err >&2
@echo OK
test-sl-pos:
@echo "#### Running SL interpreter positive tests"
@opam switch 5.1.0
@cd spectec && opam exec -- dune build @test/interp/sl-pos --profile=release
@cat spectec/_build/default/test/interp/sl-pos.err >&2
@echo OK
test-sl-neg:
@echo "#### Running SL interpreter negative tests"
@opam switch 5.1.0
@cd spectec && opam exec -- dune build @test/interp/sl-neg --profile=release
@cat spectec/_build/default/test/interp/sl-neg.err >&2
@echo OK
test-quick: test-elab test-struct
@echo "#### Quick tests passed"
test-il: test-il-pos test-il-neg
@echo "#### IL tests passed"
test-sl: test-sl-pos test-sl-neg
@echo "#### SL tests passed"
test: test-quick test-il test-sl
@echo "#### All tests passed"
promote:
@opam switch 5.1.0
@cd spectec && opam exec -- dune promote
# Cleanup
.PHONY: clean
clean:
rm -f ./$(NAME)
cd spectec && dune clean