Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid setting {BITCOIND,ELEMENTSD}_EXE in setup #88

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions bitcoind-tests/tests/setup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ pub mod test_util;
// We are not using pegins right now, but it might be required in case in future
// if we extend the tests to check pegins etc.
pub fn setup(validate_pegin: bool) -> (ElementsD, Option<BitcoinD>, elements::BlockHash) {
// Lookup bitcoind binary path
let curr_dir = std::env::current_dir().unwrap();
let bitcoind_path = curr_dir.join("bin/bitcoind");
let elementsd_path = curr_dir.join("bin/elementsd");

std::env::set_var("BITCOIND_EXE", bitcoind_path);
std::env::set_var("ELEMENTSD_EXE", elementsd_path);

let mut bitcoind = None;
if validate_pegin {
let bitcoind_exe = bitcoind::exe_path().unwrap();
Expand Down
7 changes: 7 additions & 0 deletions contrib/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ fi

# Test bitcoind integration tests if told to (this only works with the stable toolchain)
if [ "$DO_BITCOIND_TESTS" = true ]; then

BITCOIND_EXE_DEFAULT="$(git rev-parse --show-toplevel)/bitcoind-tests/bin/bitcoind"
ELEMENTSD_EXE_DEFAULT="$(git rev-parse --show-toplevel)/bitcoind-tests/bin/elementsd"

cd bitcoind-tests

BITCOIND_EXE=${BITCOIND_EXE:=${BITCOIND_EXE_DEFAULT}} \
ELEMENTSD_EXE=${ELEMENTSD_EXE:=${ELEMENTSD_EXE_DEFAULT}} \
cargo test --verbose

# Exit integration tests, do not run other tests.
Expand Down
Loading