cd build # out of tree
../configure # ... with whatever options you usually need
make check
rm src/bitcoind # remove the binary
../qa/rpc-tests/abc-p2p-fullblocktest.py # get the above error message
make # get the linked binary back
mv src/bitcoind src/mybitcoind # move it to another file
../qa/rpc-tests/abc-p2p-fullblocktest.py # get the above error message
export BITCOIND=$(pwd)/src/mybitcoind # point at renamed binary
../qa/rpc-tests/abc-p2p-fullblocktest.py # test runs ok
unset BITCOIND
../qa/rpc-tests/abc-p2p-fullblocktest.py --testbinary=$(pwd)/src/mybitcoind # test runs ok
sh ../qa/rpc-tests/test_framework/tests/run_self_tests.sh # fails because BITCOIND not set
export BITCOIND=$(pwd)/src/mybitcoind
sh ../qa/rpc-tests/test_framework/tests/run_self_tests.sh # all tests muss pass
unset BITCOIND
../qa/pull-tester/rpc-tests.py abc-p2p-fullblocktest # test fails with error msg on stderr
../qa/pull-tester/rpc-tests.py # full suite fails with similar errors
make # restore the default binary
../qa/pull-tester/rpc-tests.py abc-p2p-fullblocktest # single test runs ok
../qa/pull-tester/rpc-tests.py # full suite runs ok
For in-tree testing, just skip the 'cd build' and repeat the tests
removing the ../ prefix on relevant commands.