Skip to content

Commit 80ea7be

Browse files
committed
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.
1 parent bf0ebc8 commit 80ea7be

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.cirrus.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,16 @@ task:
183183
- tests/regtest/run_bitcoind.sh
184184
electrumx_service_background_script:
185185
- tests/regtest/run_electrumx.sh
186+
# if any test fails, the test will get aborted (--failfast) and the wallet directories will be
187+
# available for download in the Cirrus UI
186188
regtest_script:
187189
- sleep 10s
188-
- python3 -m unittest tests/regtest.py
190+
- python3 -m unittest tests/regtest.py --failfast || TEST_EXIT_CODE=$?
191+
- tar -czf test_wallets.tar.gz /tmp/alice /tmp/bob /tmp/carol || true
192+
- exit ${TEST_EXIT_CODE:-0}
193+
on_failure:
194+
wallet_artifacts:
195+
path: "test_wallets.tar.gz"
189196
env:
190197
LD_LIBRARY_PATH: contrib/_saved_secp256k1_build/
191198
ELECTRUM_REQUIREMENTS: contrib/requirements/requirements.txt

0 commit comments

Comments
 (0)