Skip to content

Commit

Permalink
Merge pull request #6 from antonilol/fix-itest
Browse files Browse the repository at this point in the history
print status while running tests
  • Loading branch information
antonilol authored Oct 22, 2023
2 parents 8e497a4 + 773fb71 commit a4dd04a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
21 changes: 16 additions & 5 deletions integration_tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,23 @@ use core::{assert_eq, ops::ControlFlow};
use std::{sync::mpsc, thread};
use util::{generate, recv_timeout_2, setup_rpc, sleep, RECV_TIMEOUT};

fn main() {
let rpc = setup_rpc();
macro_rules! test {
($($function:ident,)*) => {
let rpc = setup_rpc();
$(
println!(concat!("Running ", stringify!($function), "..."));
$function(&rpc);
println!("ok");
)*
};
}

test_hashblock(&rpc);
test_hashtx(&rpc);
test_sub_blocking(&rpc);
fn main() {
test! {
test_hashblock,
test_hashtx,
test_sub_blocking,
}
}

fn test_hashblock(rpc: &Client) {
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ echo "Running tests"

BITCOIN_CORE_COOKIE_PATH="$datadir/regtest/.cookie" cargo run

echo
echo "All tests were successful"
echo

bitcoin-cli stop
Expand Down

0 comments on commit a4dd04a

Please sign in to comment.