2014-10-31 03:58:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
CURDIR=$(cd $(dirname "$0"); pwd)
|
|
|
|
# Get BUILDDIR and REAL_BITCOIND
|
|
|
|
. "${CURDIR}/tests-config.sh"
|
|
|
|
|
|
|
|
export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
|
|
|
|
export BITCOIND=${REAL_BITCOIND}
|
|
|
|
|
2014-11-17 20:08:08 +01:00
|
|
|
if [ "x${EXEEXT}" = "x.exe" ]; then
|
|
|
|
echo "Win tests currently disabled"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2014-10-31 03:58:13 +01:00
|
|
|
#Run the tests
|
|
|
|
|
2014-12-09 17:31:23 +01:00
|
|
|
testScripts=(
|
|
|
|
'wallet.py'
|
|
|
|
'listtransactions.py'
|
|
|
|
'mempool_resurrect_test.py'
|
|
|
|
'txn_doublespend.py'
|
|
|
|
'txn_doublespend.py --mineblock'
|
|
|
|
'getchaintips.py'
|
|
|
|
'rest.py'
|
|
|
|
'mempool_spendcoinbase.py'
|
|
|
|
'mempool_coinbase_spends.py'
|
|
|
|
'httpbasics.py'
|
2015-01-07 11:21:53 +01:00
|
|
|
'zapwallettxes.py'
|
2015-04-17 19:26:03 +02:00
|
|
|
'proxy_test.py'
|
2015-02-04 02:59:41 +01:00
|
|
|
'merkle_blocks.py'
|
2014-12-09 17:31:23 +01:00
|
|
|
# 'forknotify.py'
|
2015-04-28 18:36:15 +02:00
|
|
|
'maxblocksinflight.py'
|
2015-04-28 18:39:47 +02:00
|
|
|
'invalidblockrequest.py'
|
2014-12-09 17:31:23 +01:00
|
|
|
);
|
2014-10-31 03:58:13 +01:00
|
|
|
if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
|
2014-12-09 17:31:23 +01:00
|
|
|
for (( i = 0; i < ${#testScripts[@]}; i++ ))
|
|
|
|
do
|
|
|
|
if [ -z "$1" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
|
|
|
|
then
|
2015-01-07 11:21:53 +01:00
|
|
|
echo -e "Running testscript \033[1m${testScripts[$i]}...\033[0m"
|
2014-12-09 17:31:23 +01:00
|
|
|
${BUILDDIR}/qa/rpc-tests/${testScripts[$i]} --srcdir "${BUILDDIR}/src"
|
|
|
|
fi
|
|
|
|
done
|
2014-10-31 03:58:13 +01:00
|
|
|
else
|
|
|
|
echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
|
|
|
|
fi
|