swc/scripts/coverage.sh
강동윤 36aeac8639
Coverage (#670)
Add a script to calculate coverage
2020-02-16 21:06:25 +09:00

12 lines
479 B
Bash

#!/bin/sh
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
cargo test --no-run
cargo test
zip -0 ccov.zip `find . \( -name "swc*.gc*" -o -name 'ast_node*' -o -name '*' -o -name 'enum_kind*' -o -name 'string-enum*' -o -name 'from_variant*' \) -print`;
grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore "/*" -o lcov.info;
bash <(curl -s https://codecov.io/bash) -f lcov.info;