rn 0.2.2

Command line tool for managing per-session nodejs versions based on package.json files
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash -eu

# Dead-code linkage needs to happen so that LLVM doesn't optimize it all away, leading
# to false high scores. THe no-run flag means we dont double-run the test.
RUSTFLAGS='-C link-dead-code' cargo test --no-run
rm -rf target/cov

# Let kcov run the test binary created above noting how much code is actually
# executed.
rm -f target/debug/*.d
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/rn-*

echo "Percent coverage: $(jq .percent_covered target/cov/rn-*/coverage.json)%"