diff --git a/integration_tests/src/main.rs b/integration_tests/src/main.rs index ead324d..91d70ae 100644 --- a/integration_tests/src/main.rs +++ b/integration_tests/src/main.rs @@ -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) { diff --git a/integration_tests/test.sh b/integration_tests/test.sh index 1855943..36b8741 100755 --- a/integration_tests/test.sh +++ b/integration_tests/test.sh @@ -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