Skip to content

Commit

Permalink
CI: Move bitcoind test to a separate script
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tcharding committed Jul 12, 2024
1 parent 1b6ffba commit c49b5b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions contrib/integration_test.sh
Original file line number Diff line number Diff line change
@@ -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
10 changes: 0 additions & 10 deletions contrib/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c49b5b7

Please sign in to comment.