Page MenuHomePhabricator

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

Authored by Fabien on Feb 27 2020, 21:18.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable