swc/scripts/coverage.sh
강동윤 881c3a369f
Coverage with crontab (#920)
I decided to configure crontab on my desktop because coverage test requires 20+GB of ram
2020-08-01 16:57:36 +09:00

17 lines
658 B
Bash
Executable File

#!/bin/bash
set -eu
export CARGO_INCREMENTAL=0
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests"
export RUSTDOCFLAGS="-Cpanic=abort"
export CARGO_TARGET_DIR=".COVERAGE_DIR"
cargo test --all --all-features --exclude node-swc --exclude wasm --exclude spack
zip -0 ccov.zip `find $CARGO_TARGET_DIR \( -name "swc*.gc*" -o -name 'ast_node*.gc*' -o -name 'enum_kind*.gc*' -o -name 'string-enum*.gc*' -o -name 'from_variant*.gc*' \) -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