File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
bitcoind-tests/tests/setup Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,11 @@ pub mod test_util;
10
10
pub fn setup ( ) -> BitcoinD {
11
11
// Create env var BITCOIND_EXE_PATH to point to the ../bitcoind/bin/bitcoind binary
12
12
let key = "BITCOIND_EXE" ;
13
- let curr_dir_path = std:: env:: current_dir ( ) . unwrap ( ) ;
14
- let bitcoind_path = curr_dir_path. join ( "bin" ) . join ( "bitcoind" ) ;
15
- std:: env:: set_var ( key, bitcoind_path) ;
13
+ if std:: env:: var ( key) . is_err ( ) {
14
+ let curr_dir_path = std:: env:: current_dir ( ) . unwrap ( ) ;
15
+ let bitcoind_path = curr_dir_path. join ( "bin" ) . join ( "bitcoind" ) ;
16
+ std:: env:: set_var ( key, bitcoind_path) ;
17
+ }
16
18
17
19
let exe_path = bitcoind:: exe_path ( ) . unwrap ( ) ;
18
20
let bitcoind = bitcoind:: BitcoinD :: new ( exe_path) . unwrap ( ) ;
Original file line number Diff line number Diff line change 40
40
# Test bitcoind integration tests if told to (this only works with the stable toolchain)
41
41
if [ " $DO_BITCOIND_TESTS " = true ]; then
42
42
cd bitcoind-tests
43
+ BITCOIND_EXE=" $( git rev-parse --show-toplevel) /bitcoind-tests/bin/bitcoind" \
43
44
cargo test --verbose
44
45
45
46
# Exit integration tests, do not run other tests.
You can’t perform that action at this time.
0 commit comments