mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
scripts: add cargo test args for code coverage reports
Add release and target params to `cargo test` since we collect the code coverage reports from `xx/$BUILD_TARGET/release/`. Signed-off-by: Songqian Li <sionli@tencent.com>
This commit is contained in:
parent
9f02839448
commit
0a3ad6153a
@ -174,14 +174,14 @@ ulimit -l unlimited
|
|||||||
ulimit -n 4096
|
ulimit -n 4096
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
time cargo test $test_features "common_parallel::$test_filter" -- ${test_binary_args[*]}
|
time cargo test --release --target "$BUILD_TARGET" $test_features "common_parallel::$test_filter" -- ${test_binary_args[*]}
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
# Run some tests in sequence since the result could be affected by other tests
|
# Run some tests in sequence since the result could be affected by other tests
|
||||||
# running in parallel.
|
# running in parallel.
|
||||||
if [ $RES -eq 0 ]; then
|
if [ $RES -eq 0 ]; then
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
time cargo test $test_features "common_sequential::$test_filter" -- --test-threads=1 ${test_binary_args[*]}
|
time cargo test --release --target "$BUILD_TARGET" $test_features "common_sequential::$test_filter" -- --test-threads=1 ${test_binary_args[*]}
|
||||||
RES=$?
|
RES=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -17,5 +17,5 @@ elif [[ $(uname -m) = "x86_64" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
cargo test --lib --bins --target "$BUILD_TARGET" --workspace ${cargo_args[@]} || exit 1
|
cargo test --lib --bins --target "$BUILD_TARGET" --release --workspace ${cargo_args[@]} || exit 1
|
||||||
cargo test --doc --target "$BUILD_TARGET" --workspace ${cargo_args[@]} || exit 1
|
cargo test --doc --target "$BUILD_TARGET" --release --workspace ${cargo_args[@]} || exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user