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 <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-08-10 10:07:10 +01:00
committed by Sebastien Boeuf
parent bfacf50d90
commit 5da55f0f2e
2 changed files with 9 additions and 9 deletions

View File

@@ -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=$?