forked from bytecodealliance/lucet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
107 lines (83 loc) · 2.47 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
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
105
106
107
export GUEST_MODULE_PREFIX:=$(abspath .)
CRATES_NOT_TESTED ?= lucet-spectest lucet-benchmarks lucet-runtime-example
.PHONY: build-dev
build-dev:
@echo Creating a DEBUG build
cargo build --workspace
.PHONY: build
build:
@echo Creating a RELEASE build
cargo build --workspace --release --bins --lib
.PHONY: install
install: build
@helpers/install.sh
.PHONY: install-dev
install-dev: build-dev
@helpers/install.sh --unoptimized
.PHONY: test
test: indent-check test-crates
.PHONY: test-crates
test-crates:
cargo test --no-fail-fast --all $(CRATES_NOT_TESTED:%=--exclude %)
.PHONY: test-full
test-full: indent-check audit book test-ci test-benchmarks test-fuzz
# The --release option runs the tests on an artifact built in release mode. We
# have found regressions in release mode due to optimizations in the past.
.PHONY: test-release
test-release:
cargo test --release --no-fail-fast --all --exclude $(CRATES_NOT_TESTED:%=--exclude %)
.PHONY: test-release-executables
test-release-executables:
cargo build --release -p lucetc -p lucet-wasi -p lucet-objdump
helpers/lucet-toolchain-tests/signature.sh release
helpers/lucet-toolchain-tests/objdump.sh release
.PHONY: test-ci
test-ci: test-crates test-objdump test-bitrot test-signature test-objdump
.PHONY: test-bitrot
test-bitrot:
# build but do *not* run these crates. The tests for these crates are
# known to fail, but we want to make sure they still build.
cargo check -p lucet-spectest -p lucet-runtime-example
.PHONY: test-signature
test-signature:
helpers/lucet-toolchain-tests/signature.sh
.PHONY: test-objdump
test-objdump:
cargo build -p lucet-objdump
helpers/lucet-toolchain-tests/objdump.sh
.PHONY: test-benchmarks
test-benchmarks:
# Smoke test of benchmarks:
cargo test --benches -p lucet-benchmarks -- --test
# run a single seed through the fuzzer to stave off bitrot
.PHONY: test-fuzz
test-fuzz:
cargo run -p lucet-wasi-fuzz -- test-seed 410757864950
FUZZ_NUM_TESTS?=1000
.PHONY: fuzz
fuzz:
cargo run --release -p lucet-wasi-fuzz -- fuzz --num-tests=$(FUZZ_NUM_TESTS)
.PHONY: book
book:
mdbook build docs
.PHONY: bench
bench:
cargo bench -p lucet-benchmarks
make -C benchmarks/shootout clean
make -C benchmarks/shootout bench
.PHONY: audit
audit:
cargo audit
.PHONY: clean
clean:
make -C benchmarks/shootout clean
cargo clean
.PHONY: indent
indent:
helpers/indent.sh
.PHONY: indent-check
indent-check:
helpers/indent.sh check
.PHONY: watch
watch:
cargo watch --exec "test --all --exclude $(CRATES_NOT_TESTED)"