[CMAKE] Make the test python scripts depend on targets and not on files
Summary:
The python test scripts test_runner.py and bitcoin-util-test.py
require the bitcoind, bitcoin-cli and bitcoin-tx binaries to run.
The dependency to these binaries is actually hardcoded as a relative
path, rather than relying on cmake target path substitution. This will
defeat the configuration aware generators that append a configuration
directory to the path.
Test Plan:
cmake -GNinja .. ninja check check-functional
On OSX:
cmake -GXcode .. CONFIG=RelWithDebInfo export BITCOINCLI=${PWD}/src/${CONFIG}/bitcoin-cli export BITCOIND=${PWD}/src/${CONFIG}/bitcoind cmake --build . --config ${CONFIG} --target check-functional
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D5340