1be7250db9
Backport RPC test harness PRs Cherry-picked from the following upstream PRs: - https://github.com/bitcoin/bitcoin/pull/6548 - https://github.com/bitcoin/bitcoin/pull/6804 - Just the coverage backend, not the flag to enable it for all RPC tests. - https://github.com/bitcoin/bitcoin/pull/7744 - https://github.com/bitcoin/bitcoin/pull/9832 - Excludes `wallet-hd.py` change (missing bitcoin/bitcoin#8309). Part of #2074. |
||
---|---|---|
.. | ||
test_framework | ||
.gitignore | ||
README.md | ||
addressindex.py | ||
bip65-cltv-p2p.py | ||
bipdersig-p2p.py | ||
blockchain.py | ||
decodescript.py | ||
disablewallet.py | ||
finalsaplingroot.py | ||
forknotify.py | ||
framework.py | ||
fundrawtransaction.py | ||
getblocktemplate.py | ||
getblocktemplate_longpoll.py | ||
getblocktemplate_proposals.py | ||
getchaintips.py | ||
getrawtransaction_insight.py | ||
hardforkdetection.py | ||
httpbasics.py | ||
invalidateblock.py | ||
invalidblockrequest.py | ||
key_import_export.py | ||
keypool.py | ||
listtransactions.py | ||
maxblocksinflight.py | ||
mempool_limit.py | ||
mempool_nu_activation.py | ||
mempool_reorg.py | ||
mempool_resurrect_test.py | ||
mempool_spendcoinbase.py | ||
mempool_tx_expiry.py | ||
mergetoaddress_helper.py | ||
mergetoaddress_mixednotes.py | ||
mergetoaddress_sapling.py | ||
mergetoaddress_sprout.py | ||
merkle_blocks.py | ||
mining_shielded_coinbase.py | ||
multi_rpc.py | ||
nodehandling.py | ||
p2p-acceptblock.py | ||
p2p_node_bloom.py | ||
p2p_nu_peer_management.py | ||
p2p_txexpiringsoon.py | ||
p2p_txexpiry_dos.py | ||
paymentdisclosure.py | ||
prioritisetransaction.py | ||
proton_test.py | ||
proxy_test.py | ||
pruning.py | ||
rawtransactions.py | ||
receivedby.py | ||
regtest_signrawtransaction.py | ||
reindex.py | ||
reorg_limit.py | ||
rest.py | ||
rewind_index.py | ||
rpcbind_test.py | ||
script_test.py | ||
shorter_block_times.py | ||
signrawtransaction_offline.py | ||
signrawtransactions.py | ||
smartfees.py | ||
spentindex.py | ||
sprout_sapling_migration.py | ||
timestampindex.py | ||
turnstile.py | ||
tx_expiry_helper.py | ||
txn_doublespend.py | ||
wallet.py | ||
wallet_1941.py | ||
wallet_addresses.py | ||
wallet_anchorfork.py | ||
wallet_changeaddresses.py | ||
wallet_changeindicator.py | ||
wallet_import_export.py | ||
wallet_listnotes.py | ||
wallet_listreceived.py | ||
wallet_nullifiers.py | ||
wallet_overwintertx.py | ||
wallet_persistence.py | ||
wallet_sapling.py | ||
wallet_shieldcoinbase.py | ||
wallet_shieldcoinbase_sapling.py | ||
wallet_shieldcoinbase_sprout.py | ||
wallet_shieldingcoinbase.py | ||
wallet_treestate.py | ||
walletbackup.py | ||
zapwallettxes.py | ||
zcjoinsplit.py | ||
zcjoinsplitdoublespend.py | ||
zkey_import_export.py | ||
zmq_test.py |
README.md
Regression tests of RPC interface
test_framework/test_framework.py
Base class for RPC regression tests.
test_framework/util.py
Generally useful functions.
Notes
You can run a single test by calling qa/pull-tester/rpc-tests.sh <testname>
.
Run all possible tests with qa/pull-tester/rpc-tests.sh -extended
.
Possible options:
-h, --help show this help message and exit
--nocleanup Leave zcashds and test.* datadir on exit or error
--noshutdown Don't stop bitcoinds after the test execution
--srcdir=SRCDIR Source directory containing zcashd/zcash-cli (default:
../../src)
--tmpdir=TMPDIR Root directory for datadirs
--tracerpc Print out all RPC calls as they are made
If you set the environment variable PYTHON_DEBUG=1
you will get some debug output (example: PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.sh wallet
).
A 200-block -regtest blockchain and wallets for four nodes is created the first time a regression test is run and is stored in the cache/ directory. Each node has the miner subsidy from 25 mature blocks (25*10=250 ZEC) in its wallet.
After the first run, the cache/ blockchain and wallets are copied into a temporary directory and used as the initial test state.
If you get into a bad state, you should be able to recover with:
rm -rf cache
killall zcashd