From 92448e1a2978194da83cebe9f0bdaca02a1e8288 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 2 May 2024 15:06:58 +1000 Subject: [PATCH] CI: Move bitcoind test to a separate script Done in preparation for using the new maintainer tools script. Pull the bitoind test out into a separate script because it is specific to this repo. No change in test coverage. --- .github/workflows/rust.yml | 4 +--- contrib/integration_test.sh | 12 ++++++++++++ contrib/test.sh | 10 ---------- 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100755 contrib/integration_test.sh diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7a50ba319..bb5b9b704 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -47,9 +47,7 @@ jobs: toolchain: stable override: true - name: Running integration tests - env: - DO_BITCOIND_TESTS: true - run: ./contrib/test.sh + run: ./contrib/integration_test.sh Tests: name: Tests diff --git a/contrib/integration_test.sh b/contrib/integration_test.sh new file mode 100755 index 000000000..75d948ebc --- /dev/null +++ b/contrib/integration_test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# +# Run the integration tests using the binary in `bitcoind-tests/bin`. + +set -euo pipefail + +REPO_DIR=$(git rev-parse --show-toplevel) + +# Make all cargo invocations verbose. +export CARGO_TERM_VERBOSE=true + +BITCOIND_EXE="$REPO_DIR/bitcoind-tests/bin/bitcoind" cargo test --verbose diff --git a/contrib/test.sh b/contrib/test.sh index f87400c08..15153055f 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -27,16 +27,6 @@ then cargo fmt -- --check fi -# Test bitcoind integration tests if told to (this only works with the stable toolchain) -if [ "$DO_BITCOIND_TESTS" = true ]; then - cd bitcoind-tests - BITCOIND_EXE="$(git rev-parse --show-toplevel)/bitcoind-tests/bin/bitcoind" \ - cargo test --verbose - - # Exit integration tests, do not run other tests. - exit 0 -fi - # Defaults / sanity checks cargo test