From 6074e4f962719e8d3edde189d561cb64d311671b Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Wed, 17 Oct 2018 03:20:58 -0600 Subject: [PATCH] Attempt to stabilize the test suite The integration tests are allowed to open sockets, so running them in parallel may cause "Too many open files" errors. This patch runs the unit tests in parallel and the integration test serially. --- ci/test-stable-perf.sh | 7 ++++++- ci/test-stable.sh | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ci/test-stable-perf.sh b/ci/test-stable-perf.sh index 50eaf200b..8089d221b 100755 --- a/ci/test-stable-perf.sh +++ b/ci/test-stable-perf.sh @@ -20,7 +20,12 @@ _() { "$@" } -_ cargo test --features=cuda,erasure,chacha +FEATURES=cuda,erasure,chacha +_ cargo test --verbose --features=$FEATURES --lib + +# Run integration tests serially +# shellcheck disable=SC2016 +_ find tests -type file -exec sh -c 'echo --test=$(basename ${0%.*})' {} \; | xargs cargo test --verbose --jobs=1 --features=$FEATURES echo --- ci/localnet-sanity.sh ( diff --git a/ci/test-stable.sh b/ci/test-stable.sh index efd2f0685..9c8263c8e 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -13,9 +13,13 @@ _() { _ cargo fmt -- --check _ cargo build --verbose -_ cargo test --verbose +_ cargo test --verbose --lib _ cargo clippy -- --deny=warnings +# Run integration tests serially +# shellcheck disable=SC2016 +_ find tests -type file -exec sh -c 'echo --test=$(basename ${0%.*})' {} \; | xargs cargo test --verbose --jobs=1 + echo --- ci/localnet-sanity.sh ( set -x