mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Use cargo nextest for integration tests
This alternative test runner supports retries and also reports how long each test takes to run. Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
@@ -84,14 +84,15 @@ echo "$PAGE_NUM" | sudo tee /proc/sys/vm/nr_hugepages
|
||||
sudo chmod a+rwX /dev/hugepages
|
||||
|
||||
export RUST_BACKTRACE=1
|
||||
time cargo test $test_features "live_migration_parallel::$test_filter" -- ${test_binary_args[*]}
|
||||
time cargo nextest run $test_features --retries 3 --no-fail-fast --test-threads=$(($(nproc) / 4)) "live_migration_parallel::$test_filter" -- ${test_binary_args[*]}
|
||||
|
||||
RES=$?
|
||||
|
||||
# Run some tests in sequence since the result could be affected by other tests
|
||||
# running in parallel.
|
||||
if [ $RES -eq 0 ]; then
|
||||
export RUST_BACKTRACE=1
|
||||
time cargo test $test_features "live_migration_sequential::$test_filter" -- --test-threads=1 ${test_binary_args[*]}
|
||||
time cargo nextest run $test_features --retries 3 --no-fail-fast --test-threads=1 "live_migration_sequential::$test_filter" -- ${test_binary_args[*]}
|
||||
RES=$?
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user