HomePhabricator

Added better error reporting for running individual functional tests

Description

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

Details

Provenance
jasonbcoxAuthored on Mar 16 2019, 15:18
jasonbcoxPushed on Mar 25 2019, 16:54
Reviewer
Restricted Project
Differential Revision
D2696: Added better error reporting for running individual functional tests
Parents
rABC723f52765f37: Update manpages
Branches
Unknown
Tags
Unknown