From 80ea7becdce54d7303a286cc3a535c0f2c48d811 Mon Sep 17 00:00:00 2001 From: f321x Date: Wed, 29 Oct 2025 16:57:34 +0100 Subject: [PATCH] CI: regtest: stop on failed test, expose datadirs Stops the running regtest if one test fails (using the --failfast option) and makes the wallet data directories of alice, bob and carol available for debugging. This seems helpful to fix issues only happening on the CI. --- .cirrus.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 76591dc15..d9c70159b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -183,9 +183,16 @@ task: - tests/regtest/run_bitcoind.sh electrumx_service_background_script: - tests/regtest/run_electrumx.sh + # if any test fails, the test will get aborted (--failfast) and the wallet directories will be + # available for download in the Cirrus UI regtest_script: - sleep 10s - - python3 -m unittest tests/regtest.py + - python3 -m unittest tests/regtest.py --failfast || TEST_EXIT_CODE=$? + - tar -czf test_wallets.tar.gz /tmp/alice /tmp/bob /tmp/carol || true + - exit ${TEST_EXIT_CODE:-0} + on_failure: + wallet_artifacts: + path: "test_wallets.tar.gz" env: LD_LIBRARY_PATH: contrib/_saved_secp256k1_build/ ELECTRUM_REQUIREMENTS: contrib/requirements/requirements.txt