HomePhabricator

[CMAKE] Make the test python scripts depend on targets and not on files

Description

[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

Details

Provenance
FabienAuthored on Feb 27 2020, 21:07
FabienPushed on Feb 28 2020, 13:04
Reviewer
Restricted Project
Differential Revision
D5340: [CMAKE] Make the test python scripts depend on targets and not on files
Parents
rSTAGING0c9c1fa7b21a: Remove GotVersion()
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/16603, tag: phabricator/base/16599