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
This commit is contained in:
fanquake 2024-03-07 09:42:22 +00:00 committed by pasta
parent 910a7d6cbf
commit 4dce690a5e
No known key found for this signature in database
GPG Key ID: E2F3D7916E722D38

View File

@ -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.