qa: Warn when specified test is not found
Summary:
This will warn on typos on tests provided manually on the command line. Also, this comes with the new feature that the same test can be specified multiple times on the command line.
Backport of core PR10374
https://github.com/bitcoin/bitcoin/pull/10374/files
Depends on D3367
Test Plan:
Sanity check:
test_runner.py
Should be equivalent:
test_runner.py rpc_uptime test_runner.py rpc_uptime.py
Should warn for test not found:
test_runner.py rpc_emitpu
Displays:
WARNING! Test 'rpc_emitpu.py' not found in full test list.
Should run twice:
test_runner.py rpc_uptime rpc_uptime test_runner.py rpc_uptim* rpc_uptime
Should run once:
test_runner.py rpc_uptim* rpc_uptime --exclude=rpc_uptime test_runner.py rpc_uptim* rpc_uptime --exclude=rpc_uptime.py
Should run nothing and display No valid test scripts specified. [...]:
test_runner.py rpc_uptim* rpc_uptime --exclude=rpc_uptime,rpc_uptime
Should run the test and warns that the excluded test is not found:
test_runner.py rpc_uptime --exclude=rpc_users
Displays:
WARNING! Test 'rpc_users.py' not found in current test list.
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D3368