-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgenerate-test-report.sh
More file actions
executable file
·31 lines (25 loc) · 972 Bytes
/
generate-test-report.sh
File metadata and controls
executable file
·31 lines (25 loc) · 972 Bytes
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
#!/bin/bash
base_rustflags=""
cargo_features=""
export RUSTFLAGS="${base_rustflags} --allow=warnings -Cinstrument-coverage"
# build-* ones are not parsed by grcov
export LLVM_PROFILE_FILE="profiling/build-%p-%m.profraw"
cargo build ${cargo_features} --all-targets --locked --workspace
# cleanup old values
find -name '*.profraw' | xargs rm
# different from the `cargo build` ones
LLVM_PROFILE_FILE="profiling/profile-%p-%m.profraw"
cargo nextest run --profile ci --no-fail-fast ${cargo_features} --all-targets --workspace
grcov $(find . -name "profile-*.profraw" -print) \
--binary-path ./target/debug/ \
--branch \
--excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!)" \
--excl-br-start "mod tests \{" \
--excl-line "(#\\[derive\\()|(^\s*.await[;,]?$)" \
--excl-start "mod tests \{" \
--ignore-not-existing \
--keep-only "crates/**" \
--llvm \
--output-path ./reports/ \
--output-type lcov,html,markdown \
--source-dir .