-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile
56 lines (44 loc) · 1.68 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
all: build test test-opt
test:
cargo hack --locked --each-feature test
test-opt:
cargo hack --locked --each-feature test --profile test-opt
MIN_PROTOCOL := 22
MAX_PROTOCOL := 22
test-all-protocols:
for i in $$(seq $(MIN_PROTOCOL) $$(($(MAX_PROTOCOL) + 1))); do \
if [ $$i -le $(MAX_PROTOCOL) ]; then \
echo "Testing protocol $$i for vCurr host build..."; \
TEST_PROTOCOL=$$i cargo hack test -p soroban-env-host --locked --features testutils; \
TEST_PROTOCOL=$$i cargo hack test -p soroban-simulation --locked --features testutils; \
fi; \
echo "Testing protocol $$i for vNext host build..."; \
TEST_PROTOCOL=$$i cargo hack test -p soroban-env-host --locked --features testutils,next; \
TEST_PROTOCOL=$$i cargo hack test -p soroban-simulation --locked --features testutils,next; \
done
build:
cargo hack --locked --each-feature clippy
cargo hack --locked clippy --target wasm32-unknown-unknown
# We use "run" to run the soroban-env-host/src/bin/main.rs
# entrypoint, which both excludes dev-deps (noisy) and
# actually includes soroban-env-host itself (rather than
# just its deps). We want to catch ourselves using APIs
# too!
check-apis:
cargo acl run
watch:
cargo watch --clear --watch-when-idle --shell '$(MAKE)'
fmt:
cargo fmt --all
clean:
cargo clean
regenerate-test-wasms:
make -C soroban-test-wasms regenerate-test-wasms
reobserve-tests:
for i in $$(seq $(MIN_PROTOCOL) $(MAX_PROTOCOL)); do \
TEST_PROTOCOL=$$i UPDATE_OBSERVATIONS=1 cargo test --locked -p soroban-env-host --features testutils --profile test-opt; \
done
# Requires: `cargo install cargo-llvm-cov`
coverage:
rm -f lcov.info
cargo llvm-cov test --all-features --tests --lcov --output-path=lcov.info