Merge #9276: Some minor testing cleanups

30b620c remove obsolete run-bitcoind-for-test.sh (Alex Morcos)
2a99522 remove relaypriority from rpc tests (Alex Morcos)
e2184cc Reorder RPC tests for running time (Alex Morcos)
This commit is contained in:
Wladimir J. van der Laan 2016-12-08 07:43:50 +01:00
commit ea33f197ef
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
7 changed files with 38 additions and 67 deletions

1
.gitignore vendored
View File

@ -101,7 +101,6 @@ coverage_percent.txt
linux-coverage-build linux-coverage-build
linux-build linux-build
win32-build win32-build
qa/pull-tester/run-bitcoind-for-test.sh
qa/pull-tester/tests_config.py qa/pull-tester/tests_config.py
qa/cache/* qa/cache/*

View File

@ -1077,7 +1077,6 @@ AC_SUBST(ZMQ_LIBS)
AC_SUBST(PROTOBUF_LIBS) AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(QR_LIBS) AC_SUBST(QR_LIBS)
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py]) AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
AC_CONFIG_FILES([qa/pull-tester/tests_config.py],[chmod +x qa/pull-tester/tests_config.py]) AC_CONFIG_FILES([qa/pull-tester/tests_config.py],[chmod +x qa/pull-tester/tests_config.py])
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
AC_CONFIG_LINKS([qa/pull-tester/rpc-tests.py:qa/pull-tester/rpc-tests.py]) AC_CONFIG_LINKS([qa/pull-tester/rpc-tests.py:qa/pull-tester/rpc-tests.py])

View File

@ -100,78 +100,87 @@ if ENABLE_ZMQ:
testScripts = [ testScripts = [
# longest test should go first, to favor running tests in parallel # longest test should go first, to favor running tests in parallel
'p2p-fullblocktest.py', 'wallet-hd.py',
'walletbackup.py', 'walletbackup.py',
'bip68-112-113-p2p.py', # vv Tests less than 5m vv
'p2p-fullblocktest.py',
'fundrawtransaction.py',
'p2p-compactblocks.py',
'segwit.py',
# vv Tests less than 2m vv
'wallet.py', 'wallet.py',
'wallet-accounts.py', 'wallet-accounts.py',
'wallet-hd.py', 'p2p-segwit.py',
'wallet-dump.py', 'wallet-dump.py',
'listtransactions.py', 'listtransactions.py',
# vv Tests less than 60s vv
'sendheaders.py',
'zapwallettxes.py',
'importmulti.py',
'mempool_limit.py',
'merkle_blocks.py',
'receivedby.py', 'receivedby.py',
'abandonconflict.py',
'bip68-112-113-p2p.py',
'rawtransactions.py',
'reindex.py',
# vv Tests less than 30s vv
'mempool_resurrect_test.py', 'mempool_resurrect_test.py',
'txn_doublespend.py --mineblock', 'txn_doublespend.py --mineblock',
'p2p-segwit.py',
'segwit.py',
'txn_clone.py', 'txn_clone.py',
'getchaintips.py', 'getchaintips.py',
'rawtransactions.py',
'rest.py', 'rest.py',
'mempool_spendcoinbase.py', 'mempool_spendcoinbase.py',
'mempool_reorg.py', 'mempool_reorg.py',
'mempool_limit.py',
'httpbasics.py', 'httpbasics.py',
'multi_rpc.py', 'multi_rpc.py',
'zapwallettxes.py',
'proxy_test.py', 'proxy_test.py',
'merkle_blocks.py',
'fundrawtransaction.py',
'signrawtransactions.py', 'signrawtransactions.py',
'nodehandling.py', 'nodehandling.py',
'reindex.py',
'decodescript.py', 'decodescript.py',
'blockchain.py', 'blockchain.py',
'disablewallet.py', 'disablewallet.py',
'sendheaders.py',
'keypool.py', 'keypool.py',
'p2p-mempool.py', 'p2p-mempool.py',
'prioritise_transaction.py', 'prioritise_transaction.py',
'invalidblockrequest.py', 'invalidblockrequest.py',
'invalidtxrequest.py', 'invalidtxrequest.py',
'abandonconflict.py',
'p2p-versionbits-warning.py', 'p2p-versionbits-warning.py',
'preciousblock.py', 'preciousblock.py',
'importprunedfunds.py', 'importprunedfunds.py',
'signmessages.py', 'signmessages.py',
'p2p-compactblocks.py',
'nulldummy.py', 'nulldummy.py',
'importmulti.py',
] ]
if ENABLE_ZMQ: if ENABLE_ZMQ:
testScripts.append('zmq_test.py') testScripts.append('zmq_test.py')
testScriptsExt = [ testScriptsExt = [
'pruning.py',
# vv Tests less than 20m vv
'smartfees.py',
# vv Tests less than 5m vv
'maxuploadtarget.py',
'mempool_packages.py',
# vv Tests less than 2m vv
'bip68-sequence.py',
'getblocktemplate_longpoll.py',
# vv Tests less than 60s vv
'bip9-softforks.py', 'bip9-softforks.py',
'p2p-feefilter.py',
'rpcbind_test.py',
# vv Tests less than 30s vv
'bip65-cltv.py', 'bip65-cltv.py',
'bip65-cltv-p2p.py', 'bip65-cltv-p2p.py',
'bip68-sequence.py',
'bipdersig-p2p.py', 'bipdersig-p2p.py',
'bipdersig.py', 'bipdersig.py',
'getblocktemplate_longpoll.py',
'getblocktemplate_proposals.py', 'getblocktemplate_proposals.py',
'txn_doublespend.py', 'txn_doublespend.py',
'txn_clone.py --mineblock', 'txn_clone.py --mineblock',
'forknotify.py', 'forknotify.py',
'invalidateblock.py', 'invalidateblock.py',
'rpcbind_test.py',
'smartfees.py',
'maxblocksinflight.py', 'maxblocksinflight.py',
'p2p-acceptblock.py', 'p2p-acceptblock.py',
'mempool_packages.py',
'maxuploadtarget.py',
'replace-by-fee.py', 'replace-by-fee.py',
'p2p-feefilter.py',
'pruning.py', # leave pruning last as it takes a REALLY long time
] ]

View File

@ -1,36 +0,0 @@
#!/bin/bash
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
DATADIR="@abs_top_builddir@/.bitcoin"
rm -rf "$DATADIR"
mkdir -p "$DATADIR"/regtest
touch "$DATADIR/regtest/debug.log"
tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
WAITER=$!
PORT=`expr 10000 + $$ % 55536`
"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -checkmempool=0 -relaypriority=0 -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
BITCOIND=$!
#Install a watchdog.
(sleep 10 && kill -0 $WAITER 2>/dev/null && kill -9 $BITCOIND $$)&
wait $WAITER
if [ -n "$TIMEOUT" ]; then
timeout "$TIMEOUT"s "$@" $PORT
RETURN=$?
else
"$@" $PORT
RETURN=$?
fi
(sleep 15 && kill -0 $BITCOIND 2>/dev/null && kill -9 $BITCOIND $$)&
kill $BITCOIND && wait $BITCOIND
# timeout returns 124 on timeout, otherwise the return value of the child
# If $RETURN is not 0, the test failed. Dump the tail of the debug log.
if [ $RETURN -ne 0 ]; then tail -n 200 $DATADIR/regtest/debug.log; fi
exit $RETURN

View File

@ -20,8 +20,8 @@ class MempoolPackagesTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-relaypriority=0", "-debug"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-debug"]))
self.nodes.append(start_node(1, self.options.tmpdir, ["-maxorphantx=1000", "-relaypriority=0", "-limitancestorcount=5", "-debug"])) self.nodes.append(start_node(1, self.options.tmpdir, ["-maxorphantx=1000", "-limitancestorcount=5", "-debug"]))
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)
self.is_network_split = False self.is_network_split = False
self.sync_all() self.sync_all()

View File

@ -76,7 +76,7 @@ class ReplaceByFeeTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-debug", self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-debug",
"-relaypriority=0", "-whitelist=127.0.0.1", "-whitelist=127.0.0.1",
"-limitancestorcount=50", "-limitancestorcount=50",
"-limitancestorsize=101", "-limitancestorsize=101",
"-limitdescendantcount=200", "-limitdescendantcount=200",

View File

@ -159,7 +159,7 @@ class EstimateFeeTest(BitcoinTestFramework):
self.nodes = [] self.nodes = []
# Use node0 to mine blocks for input splitting # Use node0 to mine blocks for input splitting
self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000",
"-relaypriority=0", "-whitelist=127.0.0.1"])) "-whitelist=127.0.0.1"]))
print("This test is time consuming, please be patient") print("This test is time consuming, please be patient")
print("Splitting inputs to small size so we can generate low priority tx's") print("Splitting inputs to small size so we can generate low priority tx's")
@ -197,12 +197,12 @@ class EstimateFeeTest(BitcoinTestFramework):
# (17k is room enough for 110 or so transactions) # (17k is room enough for 110 or so transactions)
self.nodes.append(start_node(1, self.options.tmpdir, self.nodes.append(start_node(1, self.options.tmpdir,
["-blockprioritysize=1500", "-blockmaxsize=17000", ["-blockprioritysize=1500", "-blockmaxsize=17000",
"-maxorphantx=1000", "-relaypriority=0", "-debug=estimatefee"])) "-maxorphantx=1000", "-debug=estimatefee"]))
connect_nodes(self.nodes[1], 0) connect_nodes(self.nodes[1], 0)
# Node2 is a stingy miner, that # Node2 is a stingy miner, that
# produces too small blocks (room for only 55 or so transactions) # produces too small blocks (room for only 55 or so transactions)
node2args = ["-blockprioritysize=0", "-blockmaxsize=8000", "-maxorphantx=1000", "-relaypriority=0"] node2args = ["-blockprioritysize=0", "-blockmaxsize=8000", "-maxorphantx=1000"]
self.nodes.append(start_node(2, self.options.tmpdir, node2args)) self.nodes.append(start_node(2, self.options.tmpdir, node2args))
connect_nodes(self.nodes[0], 2) connect_nodes(self.nodes[0], 2)