From 5da55f0f2eaff65c811f5ad72252bd75789f59b0 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 10 Aug 2020 10:07:10 +0100 Subject: [PATCH] tests: Remove "--nocapture" from tests `cargo test` runs every test in its own process and by default will collect the output from the test and only print it if the test fails. `--nocapture` instead prints any output from the test immediately and does not collate it - this leads to interleaving. `--nocapture` might be useful for local test debugging but is not something that is helpful, and is instead unhelpful for our CI as a whole. Signed-off-by: Rob Bradford --- scripts/run_integration_tests_aarch64.sh | 6 +++--- scripts/run_integration_tests_x86_64.sh | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index c4fa1967f..f298e54f5 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -206,7 +206,7 @@ sudo bash -c "echo 1 > /sys/kernel/mm/ksm/run" sudo adduser $USER kvm newgrp kvm << EOF export RUST_BACKTRACE=1 -time cargo test --no-default-features --features "integration_tests,pci,kvm" "tests::parallel::$@" -- --nocapture +time cargo test --no-default-features --features "integration_tests,pci,kvm" "tests::parallel::$@" EOF RES=$? @@ -221,12 +221,12 @@ if [ $RES -eq 0 ]; then sudo setcap cap_net_admin+ep target/$BUILD_TARGET/release/vhost_user_net # Ensure test binary has the same caps as the cloud-hypervisor one - time cargo test --no-run --no-default-features --features "integration_tests,mmio,kvm" -- --nocapture || exit 1 + time cargo test --no-run --no-default-features --features "integration_tests,mmio,kvm" || exit 1 ls target/debug/deps/cloud_hypervisor-* | xargs -n 1 sudo setcap cap_net_admin+ep newgrp kvm << EOF export RUST_BACKTRACE=1 -time cargo test --no-default-features --features "integration_tests,mmio,kvm" "tests::parallel::$@" -- --nocapture +time cargo test --no-default-features --features "integration_tests,mmio,kvm" "tests::parallel::$@" EOF RES=$? diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index 74f992c31..2d3e294c4 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -227,13 +227,13 @@ echo 4096 | sudo tee /proc/sys/vm/nr_hugepages sudo chmod a+rwX /dev/hugepages # Ensure test binary has the same caps as the cloud-hypervisor one -time cargo test --no-run --features "integration_tests" -- --nocapture || exit 1 +time cargo test --no-run --features "integration_tests" || exit 1 ls target/debug/deps/cloud_hypervisor-* | xargs -n 1 sudo setcap cap_net_admin+ep sudo adduser $USER kvm newgrp kvm << EOF export RUST_BACKTRACE=1 -time cargo test --features "integration_tests" "tests::parallel::$@" -- --nocapture +time cargo test --features "integration_tests" "tests::parallel::$@" EOF RES=$? @@ -242,7 +242,7 @@ RES=$? if [ $RES -eq 0 ]; then newgrp kvm << EOF export RUST_BACKTRACE=1 -time cargo test --features "integration_tests" "tests::sequential::$@" -- --nocapture --test-threads=1 +time cargo test --features "integration_tests" "tests::sequential::$@" -- --test-threads=1 EOF RES=$? fi @@ -257,12 +257,12 @@ if [ $RES -eq 0 ]; then sudo setcap cap_net_admin+ep target/$BUILD_TARGET/release/cloud-hypervisor # Ensure test binary has the same caps as the cloud-hypervisor one - time cargo test --no-run --features "integration_tests,mmio" -- --nocapture || exit 1 + time cargo test --no-run --features "integration_tests,mmio" || exit 1 ls target/debug/deps/cloud_hypervisor-* | xargs -n 1 sudo setcap cap_net_admin+ep newgrp kvm << EOF export RUST_BACKTRACE=1 -time cargo test --features "integration_tests,mmio" "tests::parallel::$@" -- --nocapture +time cargo test --features "integration_tests,mmio" "tests::parallel::$@" EOF RES=$? @@ -272,7 +272,7 @@ EOF if [ $RES -eq 0 ]; then newgrp kvm << EOF export RUST_BACKTRACE=1 -time cargo test --features "integration_tests,mmio" "tests::sequential::$@" -- --nocapture --test-threads=1 +time cargo test --features "integration_tests,mmio" "tests::sequential::$@" -- --test-threads=1 EOF RES=$? fi