-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
56 lines (47 loc) · 1.35 KB
/
Justfile
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
server:
cargo run --features cli -- server
command-server:
cargo run --features cli -- command-server
test:
cargo test --all-features
docker-checks:
docker build -t respicta . --target checks
coverage: coverage-build coverage-lcov coverage-html
coverage-build:
mkdir -p coverage
rm -rf target_coverage
CARGO_TARGET_DIR="target_coverage" CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='target_coverage/coverage/%p-%m.profraw' cargo test --all-features
coverage-lcov:
grcov target_coverage/coverage \
--llvm \
--binary-path ./target_coverage/debug/deps/ \
-s . \
--branch \
--ignore-not-existing \
--excl-start '^(pub(\((crate|super)\))? )?mod tests' \
--excl-stop '^}' \
--ignore="target_coverage/*" \
--ignore="*/tests/*" \
--ignore="src/main.rs" \
-t lcov \
-o coverage/lcov.info
coverage-html:
rm -rf coverage/html
grcov target_coverage/coverage \
--llvm \
--binary-path ./target_coverage/debug/deps/ \
-s . \
--branch \
--ignore-not-existing \
--excl-start '^(pub(\((crate|super)\))? )?mod tests' \
--excl-stop '^}' \
--ignore="target_coverage/*" \
--ignore="*/tests/*" \
--ignore="src/main.rs" \
-t html \
-o coverage/html
docker-test:
docker build -t respicta . --target test
memprofile:
RUSTFLAGS="-g" cargo build --release \
&& heaptrack ./target/release/respicta server