mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Do not return a failure when no tests are run
It is a common use case to run a subset of tests locally to verify certain functionalities. The default behaviour for nextest is to error out if no tests are run. That causes the test scripts to return a non-zero value (failure). Pass `--no-tests=pass` to nextest to match what `cargo test` does if no tests are run. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -87,7 +87,7 @@ sudo chmod a+rwX /dev/hugepages
|
||||
export RUST_BACKTRACE=1
|
||||
export RUSTFLAGS="$RUSTFLAGS"
|
||||
|
||||
time cargo nextest run $test_features --retries 3 --no-fail-fast --test-threads=$(($(nproc) / 4)) "live_migration_parallel::$test_filter" -- ${test_binary_args[*]}
|
||||
time cargo nextest run $test_features --retries 3 --no-fail-fast --no-tests=pass --test-threads=$(($(nproc) / 4)) "live_migration_parallel::$test_filter" -- ${test_binary_args[*]}
|
||||
|
||||
RES=$?
|
||||
|
||||
@@ -95,7 +95,7 @@ RES=$?
|
||||
# running in parallel.
|
||||
if [ $RES -eq 0 ]; then
|
||||
export RUST_BACKTRACE=1
|
||||
time cargo nextest run $test_features --retries 3 --no-fail-fast --test-threads=1 "live_migration_sequential::$test_filter" -- ${test_binary_args[*]}
|
||||
time cargo nextest run $test_features --retries 3 --no-fail-fast --no-tests=pass --test-threads=1 "live_migration_sequential::$test_filter" -- ${test_binary_args[*]}
|
||||
RES=$?
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user