From 4dce690a5edeb3025028d15afa3248d9ac3bc87a Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 7 Mar 2024 09:42:22 +0000 Subject: [PATCH] Merge bitcoin/bitcoin#29576: Update functional test runner to return error code when no tests are found to run 33268a855883142a039a7a7b14eb1345e52809fd test: exit with code 1 when no fn tests are found (Max Edwards) Pull request description: As discussed in the following PR comment: https://github.com/bitcoin/bitcoin/pull/29535#issuecomment-1979259786 Prevents the test_runner from exiting silently with code 0 when no tests were found which has recently happened after a GHA runner update such as in this run: https://github.com/bitcoin/bitcoin/actions/runs/8131828989/job/22239779585#step:27:63 ACKs for top commit: TheCharlatan: ACK 33268a855883142a039a7a7b14eb1345e52809fd theStack: lgtm ACK 33268a855883142a039a7a7b14eb1345e52809fd Tree-SHA512: d389e9f5e4da7ce1627fb2fad9b33baf0b04e75dbdbfc0dbf5f1e3e2b0ae1e79721476c5668476055b0f7de29723ed02c8d7e420081a555030cb784886e240fc --- test/functional/test_runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 42e54fc578..13fee193f1 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -453,7 +453,7 @@ def main(): if not enable_bitcoind: print("No functional tests to run.") print("Rerun ./configure with --with-daemon and then make") - sys.exit(0) + sys.exit(1) # Build list of tests test_list = [] @@ -502,7 +502,7 @@ def main(): if not test_list: print("No valid test scripts specified. Check that your test is in one " "of the test lists in test_runner.py, or run test_runner.py with no arguments to run all tests") - sys.exit(0) + sys.exit(1) if args.help: # Print help for test_runner.py, then print help of the first script (with args removed) and exit.