Added better error reporting for running individual functional tests
Summary:
While Nico was debugging functional tests with pdb, he found that it was difficult to interact with the pdb CLI when the test was run via test_runner. The best way is to run the test directly. However, out-of-tree builds produce a file-not-found error that is non-descriptive. Digging in the code, I found that there's little indication that BITCOIND and BITCOINCLI binary paths can be set explicitly, fixing this issue.
The best way to inform the operator is a simple error message that matches this issue.
Test Plan:
Note that test.py is any individual test (not test_runner.py):
# Build out-of-tree mkdir build cd build ../configure make # Without this patch ../test/functional/test.py # Produces a file-not-found error message # With this patch BITCOIND=~/bitcoind ../test/functional/test.py # Some invalid path produces a nice error message BITCOIND=./src/bitcoind ../test/functional/test.py # Test runs as expected BITCOINCLI=~/bitcoin-cli ../test/functional/test.py # Some invalid path produces a nice error message BITCOINCLI=./src/bitcoin-cli ../test/functional/test.py # Test runs as expected
Reviewers: deadalnix, Fabien, #bitcoin_abc
Reviewed By: deadalnix, #bitcoin_abc
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2696