Browse Source

Rename rpc-tests directory to functional

0.15
John Newbery 8 years ago
parent
commit
c28ee91db0
  1. 2
      .travis.yml
  2. 14
      Makefile.am
  3. 2
      README.md
  4. 3
      configure.ac
  5. 2
      contrib/devtools/copyright_header.py
  6. 4
      doc/developer-notes.md
  7. 6
      test/README.md
  8. 0
      test/functional/.gitignore
  9. 0
      test/functional/README.md
  10. 0
      test/functional/abandonconflict.py
  11. 0
      test/functional/assumevalid.py
  12. 0
      test/functional/bip65-cltv-p2p.py
  13. 0
      test/functional/bip65-cltv.py
  14. 0
      test/functional/bip68-112-113-p2p.py
  15. 0
      test/functional/bip68-sequence.py
  16. 0
      test/functional/bip9-softforks.py
  17. 0
      test/functional/bipdersig-p2p.py
  18. 0
      test/functional/bipdersig.py
  19. 0
      test/functional/blockchain.py
  20. 0
      test/functional/bumpfee.py
  21. 2
      test/functional/create_cache.py
  22. 0
      test/functional/decodescript.py
  23. 0
      test/functional/disablewallet.py
  24. 0
      test/functional/forknotify.py
  25. 0
      test/functional/fundrawtransaction.py
  26. 0
      test/functional/getblocktemplate_longpoll.py
  27. 0
      test/functional/getblocktemplate_proposals.py
  28. 0
      test/functional/getchaintips.py
  29. 0
      test/functional/httpbasics.py
  30. 0
      test/functional/import-rescan.py
  31. 0
      test/functional/importmulti.py
  32. 0
      test/functional/importprunedfunds.py
  33. 0
      test/functional/invalidateblock.py
  34. 0
      test/functional/invalidblockrequest.py
  35. 0
      test/functional/invalidtxrequest.py
  36. 0
      test/functional/keypool.py
  37. 0
      test/functional/listsinceblock.py
  38. 0
      test/functional/listtransactions.py
  39. 0
      test/functional/maxblocksinflight.py
  40. 0
      test/functional/maxuploadtarget.py
  41. 0
      test/functional/mempool_limit.py
  42. 0
      test/functional/mempool_packages.py
  43. 0
      test/functional/mempool_reorg.py
  44. 0
      test/functional/mempool_resurrect_test.py
  45. 0
      test/functional/mempool_spendcoinbase.py
  46. 0
      test/functional/merkle_blocks.py
  47. 0
      test/functional/multi_rpc.py
  48. 0
      test/functional/nodehandling.py
  49. 0
      test/functional/nulldummy.py
  50. 0
      test/functional/p2p-acceptblock.py
  51. 0
      test/functional/p2p-compactblocks.py
  52. 0
      test/functional/p2p-feefilter.py
  53. 0
      test/functional/p2p-fullblocktest.py
  54. 0
      test/functional/p2p-leaktests.py
  55. 0
      test/functional/p2p-mempool.py
  56. 0
      test/functional/p2p-segwit.py
  57. 0
      test/functional/p2p-timeouts.py
  58. 0
      test/functional/p2p-versionbits-warning.py
  59. 0
      test/functional/preciousblock.py
  60. 0
      test/functional/prioritise_transaction.py
  61. 0
      test/functional/proxy_test.py
  62. 0
      test/functional/pruning.py
  63. 0
      test/functional/rawtransactions.py
  64. 0
      test/functional/receivedby.py
  65. 0
      test/functional/reindex.py
  66. 0
      test/functional/replace-by-fee.py
  67. 0
      test/functional/rest.py
  68. 0
      test/functional/rpcbind_test.py
  69. 0
      test/functional/rpcnamedargs.py
  70. 0
      test/functional/segwit.py
  71. 0
      test/functional/sendheaders.py
  72. 0
      test/functional/signmessages.py
  73. 0
      test/functional/signrawtransactions.py
  74. 0
      test/functional/smartfees.py
  75. 0
      test/functional/test_framework/__init__.py
  76. 0
      test/functional/test_framework/address.py
  77. 0
      test/functional/test_framework/authproxy.py
  78. 0
      test/functional/test_framework/bignum.py
  79. 0
      test/functional/test_framework/blockstore.py
  80. 0
      test/functional/test_framework/blocktools.py
  81. 0
      test/functional/test_framework/comptool.py
  82. 0
      test/functional/test_framework/coverage.py
  83. 0
      test/functional/test_framework/key.py
  84. 0
      test/functional/test_framework/mininode.py
  85. 0
      test/functional/test_framework/netutil.py
  86. 0
      test/functional/test_framework/script.py
  87. 0
      test/functional/test_framework/siphash.py
  88. 0
      test/functional/test_framework/socks5.py
  89. 0
      test/functional/test_framework/test_framework.py
  90. 0
      test/functional/test_framework/util.py
  91. 0
      test/functional/txn_clone.py
  92. 0
      test/functional/txn_doublespend.py
  93. 0
      test/functional/wallet-accounts.py
  94. 0
      test/functional/wallet-dump.py
  95. 0
      test/functional/wallet-hd.py
  96. 0
      test/functional/wallet.py
  97. 0
      test/functional/walletbackup.py
  98. 0
      test/functional/zapwallettxes.py
  99. 0
      test/functional/zmq_test.py
  100. 16
      test/pull-tester/rpc-tests.py

2
.travis.yml

@ -70,7 +70,7 @@ script:
- make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false ) - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib - export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
- if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS check VERBOSE=1; fi - if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS check VERBOSE=1; fi
- if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.py --coverage; fi - if [ "$RUN_TESTS" = "true" ]; then functional/pull-tester/rpc-tests.py --coverage; fi
after_script: after_script:
- echo $TRAVIS_COMMIT_RANGE - echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_COMMIT_LOG - echo $TRAVIS_COMMIT_LOG

14
Makefile.am

@ -61,7 +61,7 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
COVERAGE_INFO = baseline_filtered_combined.info baseline.info \ COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
baseline_filtered.info rpc_test.info rpc_test_filtered.info \ baseline_filtered.info functional_test.info functional_test_filtered.info \
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
dist-hook: dist-hook:
@ -194,20 +194,20 @@ test_bitcoin.info: baseline_filtered_combined.info
test_bitcoin_filtered.info: test_bitcoin.info test_bitcoin_filtered.info: test_bitcoin.info
$(LCOV) -r $< "/usr/include/*" -o $@ $(LCOV) -r $< "/usr/include/*" -o $@
rpc_test.info: test_bitcoin_filtered.info functional_test.info: test_bitcoin_filtered.info
-@TIMEOUT=15 python test/pull-tester/rpc-tests.py $(EXTENDED_RPC_TESTS) -@TIMEOUT=15 python test/pull-tester/rpc-tests.py $(EXTENDED_RPC_TESTS)
$(LCOV) -c -d $(abs_builddir)/src --t rpc-tests -o $@ $(LCOV) -c -d $(abs_builddir)/src --t functional-tests -o $@
$(LCOV) -z -d $(abs_builddir)/src $(LCOV) -z -d $(abs_builddir)/src
$(LCOV) -z -d $(abs_builddir)/src/leveldb $(LCOV) -z -d $(abs_builddir)/src/leveldb
rpc_test_filtered.info: rpc_test.info functional_test_filtered.info: functional_test.info
$(LCOV) -r $< "/usr/include/*" -o $@ $(LCOV) -r $< "/usr/include/*" -o $@
test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@ $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info rpc_test_filtered.info total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info functional_test_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a rpc_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
$(GENHTML) -s $< -o $(@D) $(GENHTML) -s $< -o $(@D)
@ -223,7 +223,7 @@ endif
dist_noinst_SCRIPTS = autogen.sh dist_noinst_SCRIPTS = autogen.sh
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh test/pull-tester/rpc-tests.py test/rpc-tests $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS) EXTRA_DIST = $(top_srcdir)/share/genbuild.sh test/pull-tester/rpc-tests.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER) CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)

2
README.md

@ -54,7 +54,7 @@ submit new unit tests for old code. Unit tests can be compiled and run
(assuming they weren't disabled in configure) with: `make check`. Further details on running (assuming they weren't disabled in configure) with: `make check`. Further details on running
and extending unit tests can be found in [/src/test/README.md](/src/test/README.md). and extending unit tests can be found in [/src/test/README.md](/src/test/README.md).
There are also [regression and integration tests](/test) of the RPC interface, written There are also [regression and integration tests](/test), written
in Python, that are run automatically on the build server. in Python, that are run automatically on the build server.
These tests can be run (if the [test dependencies](/test) are installed) with: `test/pull-tester/rpc-tests.py` These tests can be run (if the [test dependencies](/test) are installed) with: `test/pull-tester/rpc-tests.py`

3
configure.ac

@ -1147,8 +1147,7 @@ AC_SUBST(EVENT_PTHREADS_LIBS)
AC_SUBST(ZMQ_LIBS) 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 test/pull-tester/tests_config.ini])
AC_CONFIG_FILES([test/pull-tester/tests_config.ini],[chmod +x test/pull-tester/tests_config.ini])
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([test/pull-tester/rpc-tests.py:test/pull-tester/rpc-tests.py]) AC_CONFIG_LINKS([test/pull-tester/rpc-tests.py:test/pull-tester/rpc-tests.py])

2
contrib/devtools/copyright_header.py

@ -32,7 +32,7 @@ EXCLUDE = [
'src/tinyformat.h', 'src/tinyformat.h',
'src/leveldb/util/env_win.cc', 'src/leveldb/util/env_win.cc',
'src/crypto/ctaes/bench.c', 'src/crypto/ctaes/bench.c',
'test/rpc-tests/test_framework/bignum.py', 'test/functional/test_framework/bignum.py',
# python init: # python init:
'*__init__.py', '*__init__.py',
] ]

4
doc/developer-notes.md

@ -132,7 +132,7 @@ Run with the -testnet option to run with "play bitcoins" on the test network, if
are testing multi-machine code that needs to operate across the internet. are testing multi-machine code that needs to operate across the internet.
If you are testing something that can run on one machine, run with the -regtest option. If you are testing something that can run on one machine, run with the -regtest option.
In regression test mode, blocks can be created on-demand; see test/rpc-tests/ for tests In regression test mode, blocks can be created on-demand; see test/functional/ for tests
that run in -regtest mode. that run in -regtest mode.
**DEBUG_LOCKORDER** **DEBUG_LOCKORDER**
@ -252,7 +252,7 @@ Wallet
- *Rationale*: In RPC code that conditionally uses the wallet (such as - *Rationale*: In RPC code that conditionally uses the wallet (such as
`validateaddress`) it is easy to forget that global pointer `pwalletMain` `validateaddress`) it is easy to forget that global pointer `pwalletMain`
can be NULL. See `test/rpc-tests/disablewallet.py` for functional tests can be NULL. See `test/functional/disablewallet.py` for functional tests
exercising the API with `-disablewallet` exercising the API with `-disablewallet`
- Include `db_cxx.h` (BerkeleyDB header) only when `ENABLE_WALLET` is set - Include `db_cxx.h` (BerkeleyDB header) only when `ENABLE_WALLET` is set

6
test/README.md

@ -1,5 +1,5 @@
The [pull-tester](/test/pull-tester/) folder contains a script to call The [pull-tester](/test/pull-tester/) folder contains a script to call
multiple tests from the [rpc-tests](/test/rpc-tests/) folder. multiple tests from the [functional](/test/functional/) folder.
Every pull request to the bitcoin repository is built and run through Every pull request to the bitcoin repository is built and run through
the regression test suite. You can also run all or only individual the regression test suite. You can also run all or only individual
@ -83,5 +83,5 @@ killall bitcoind
Writing tests Writing tests
============= =============
You are encouraged to write tests for new or existing features. You are encouraged to write tests for new or existing features.
Further information about the test framework and individual RPC Further information about the test framework and individual functional
tests is found in [test/rpc-tests](/test/rpc-tests). tests is found in [test/functional](/test/functional).

0
test/rpc-tests/.gitignore → test/functional/.gitignore vendored

0
test/rpc-tests/README.md → test/functional/README.md

0
test/rpc-tests/abandonconflict.py → test/functional/abandonconflict.py

0
test/rpc-tests/assumevalid.py → test/functional/assumevalid.py

0
test/rpc-tests/bip65-cltv-p2p.py → test/functional/bip65-cltv-p2p.py

0
test/rpc-tests/bip65-cltv.py → test/functional/bip65-cltv.py

0
test/rpc-tests/bip68-112-113-p2p.py → test/functional/bip68-112-113-p2p.py

0
test/rpc-tests/bip68-sequence.py → test/functional/bip68-sequence.py

0
test/rpc-tests/bip9-softforks.py → test/functional/bip9-softforks.py

0
test/rpc-tests/bipdersig-p2p.py → test/functional/bipdersig-p2p.py

0
test/rpc-tests/bipdersig.py → test/functional/bipdersig.py

0
test/rpc-tests/blockchain.py → test/functional/blockchain.py

0
test/rpc-tests/bumpfee.py → test/functional/bumpfee.py

2
test/rpc-tests/create_cache.py → test/functional/create_cache.py

@ -5,7 +5,7 @@
"""Create a blockchain cache. """Create a blockchain cache.
Creating a cache of the blockchain speeds up test execution when running Creating a cache of the blockchain speeds up test execution when running
multiple qa tests. This helper script is executed by rpc-tests when multiple multiple functional tests. This helper script is executed by rpc-tests when multiple
tests are being run in parallel. tests are being run in parallel.
""" """

0
test/rpc-tests/decodescript.py → test/functional/decodescript.py

0
test/rpc-tests/disablewallet.py → test/functional/disablewallet.py

0
test/rpc-tests/forknotify.py → test/functional/forknotify.py

0
test/rpc-tests/fundrawtransaction.py → test/functional/fundrawtransaction.py

0
test/rpc-tests/getblocktemplate_longpoll.py → test/functional/getblocktemplate_longpoll.py

0
test/rpc-tests/getblocktemplate_proposals.py → test/functional/getblocktemplate_proposals.py

0
test/rpc-tests/getchaintips.py → test/functional/getchaintips.py

0
test/rpc-tests/httpbasics.py → test/functional/httpbasics.py

0
test/rpc-tests/import-rescan.py → test/functional/import-rescan.py

0
test/rpc-tests/importmulti.py → test/functional/importmulti.py

0
test/rpc-tests/importprunedfunds.py → test/functional/importprunedfunds.py

0
test/rpc-tests/invalidateblock.py → test/functional/invalidateblock.py

0
test/rpc-tests/invalidblockrequest.py → test/functional/invalidblockrequest.py

0
test/rpc-tests/invalidtxrequest.py → test/functional/invalidtxrequest.py

0
test/rpc-tests/keypool.py → test/functional/keypool.py

0
test/rpc-tests/listsinceblock.py → test/functional/listsinceblock.py

0
test/rpc-tests/listtransactions.py → test/functional/listtransactions.py

0
test/rpc-tests/maxblocksinflight.py → test/functional/maxblocksinflight.py

0
test/rpc-tests/maxuploadtarget.py → test/functional/maxuploadtarget.py

0
test/rpc-tests/mempool_limit.py → test/functional/mempool_limit.py

0
test/rpc-tests/mempool_packages.py → test/functional/mempool_packages.py

0
test/rpc-tests/mempool_reorg.py → test/functional/mempool_reorg.py

0
test/rpc-tests/mempool_resurrect_test.py → test/functional/mempool_resurrect_test.py

0
test/rpc-tests/mempool_spendcoinbase.py → test/functional/mempool_spendcoinbase.py

0
test/rpc-tests/merkle_blocks.py → test/functional/merkle_blocks.py

0
test/rpc-tests/multi_rpc.py → test/functional/multi_rpc.py

0
test/rpc-tests/nodehandling.py → test/functional/nodehandling.py

0
test/rpc-tests/nulldummy.py → test/functional/nulldummy.py

0
test/rpc-tests/p2p-acceptblock.py → test/functional/p2p-acceptblock.py

0
test/rpc-tests/p2p-compactblocks.py → test/functional/p2p-compactblocks.py

0
test/rpc-tests/p2p-feefilter.py → test/functional/p2p-feefilter.py

0
test/rpc-tests/p2p-fullblocktest.py → test/functional/p2p-fullblocktest.py

0
test/rpc-tests/p2p-leaktests.py → test/functional/p2p-leaktests.py

0
test/rpc-tests/p2p-mempool.py → test/functional/p2p-mempool.py

0
test/rpc-tests/p2p-segwit.py → test/functional/p2p-segwit.py

0
test/rpc-tests/p2p-timeouts.py → test/functional/p2p-timeouts.py

0
test/rpc-tests/p2p-versionbits-warning.py → test/functional/p2p-versionbits-warning.py

0
test/rpc-tests/preciousblock.py → test/functional/preciousblock.py

0
test/rpc-tests/prioritise_transaction.py → test/functional/prioritise_transaction.py

0
test/rpc-tests/proxy_test.py → test/functional/proxy_test.py

0
test/rpc-tests/pruning.py → test/functional/pruning.py

0
test/rpc-tests/rawtransactions.py → test/functional/rawtransactions.py

0
test/rpc-tests/receivedby.py → test/functional/receivedby.py

0
test/rpc-tests/reindex.py → test/functional/reindex.py

0
test/rpc-tests/replace-by-fee.py → test/functional/replace-by-fee.py

0
test/rpc-tests/rest.py → test/functional/rest.py

0
test/rpc-tests/rpcbind_test.py → test/functional/rpcbind_test.py

0
test/rpc-tests/rpcnamedargs.py → test/functional/rpcnamedargs.py

0
test/rpc-tests/segwit.py → test/functional/segwit.py

0
test/rpc-tests/sendheaders.py → test/functional/sendheaders.py

0
test/rpc-tests/signmessages.py → test/functional/signmessages.py

0
test/rpc-tests/signrawtransactions.py → test/functional/signrawtransactions.py

0
test/rpc-tests/smartfees.py → test/functional/smartfees.py

0
test/rpc-tests/test_framework/__init__.py → test/functional/test_framework/__init__.py

0
test/rpc-tests/test_framework/address.py → test/functional/test_framework/address.py

0
test/rpc-tests/test_framework/authproxy.py → test/functional/test_framework/authproxy.py

0
test/rpc-tests/test_framework/bignum.py → test/functional/test_framework/bignum.py

0
test/rpc-tests/test_framework/blockstore.py → test/functional/test_framework/blockstore.py

0
test/rpc-tests/test_framework/blocktools.py → test/functional/test_framework/blocktools.py

0
test/rpc-tests/test_framework/comptool.py → test/functional/test_framework/comptool.py

0
test/rpc-tests/test_framework/coverage.py → test/functional/test_framework/coverage.py

0
test/rpc-tests/test_framework/key.py → test/functional/test_framework/key.py

0
test/rpc-tests/test_framework/mininode.py → test/functional/test_framework/mininode.py

0
test/rpc-tests/test_framework/netutil.py → test/functional/test_framework/netutil.py

0
test/rpc-tests/test_framework/script.py → test/functional/test_framework/script.py

0
test/rpc-tests/test_framework/siphash.py → test/functional/test_framework/siphash.py

0
test/rpc-tests/test_framework/socks5.py → test/functional/test_framework/socks5.py

0
test/rpc-tests/test_framework/test_framework.py → test/functional/test_framework/test_framework.py

0
test/rpc-tests/test_framework/util.py → test/functional/test_framework/util.py

0
test/rpc-tests/txn_clone.py → test/functional/txn_clone.py

0
test/rpc-tests/txn_doublespend.py → test/functional/txn_doublespend.py

0
test/rpc-tests/wallet-accounts.py → test/functional/wallet-accounts.py

0
test/rpc-tests/wallet-dump.py → test/functional/wallet-dump.py

0
test/rpc-tests/wallet-hd.py → test/functional/wallet-hd.py

0
test/rpc-tests/wallet.py → test/functional/wallet.py

0
test/rpc-tests/walletbackup.py → test/functional/walletbackup.py

0
test/rpc-tests/zapwallettxes.py → test/functional/zapwallettxes.py

0
test/rpc-tests/zmq_test.py → test/functional/zmq_test.py

16
test/pull-tester/rpc-tests.py

@ -8,7 +8,7 @@ rpc-tests.py - run regression test suite
This module calls down into individual test cases via subprocess. It will This module calls down into individual test cases via subprocess. It will
forward all unrecognized arguments onto the individual test scripts. forward all unrecognized arguments onto the individual test scripts.
RPC tests are disabled on Windows by default. Use --force to run them anyway. Functional tests are disabled on Windows by default. Use --force to run them anyway.
For a description of arguments recognized by test scripts, see For a description of arguments recognized by test scripts, see
`test/pull-tester/test_framework/test_framework.py:BitcoinTestFramework.main`. `test/pull-tester/test_framework/test_framework.py:BitcoinTestFramework.main`.
@ -161,7 +161,7 @@ def main():
sys.exit(0) sys.exit(0)
if not (enable_wallet and enable_utils and enable_bitcoind): if not (enable_wallet and enable_utils and enable_bitcoind):
print("No rpc tests to run. Wallet, utils, and bitcoind must all be enabled") print("No functional tests to run. Wallet, utils, and bitcoind must all be enabled")
print("Rerun `configure` with -enable-wallet, -with-utils and -with-daemon and rerun make") print("Rerun `configure` with -enable-wallet, -with-utils and -with-daemon and rerun make")
sys.exit(0) sys.exit(0)
@ -206,7 +206,7 @@ def main():
if args.help: if args.help:
# Print help for rpc-tests.py, then print help of the first script and exit. # Print help for rpc-tests.py, then print help of the first script and exit.
parser.print_help() parser.print_help()
subprocess.check_call((config["environment"]["SRCDIR"] + '/test/rpc-tests/' + test_list[0]).split() + ['-h']) subprocess.check_call((config["environment"]["SRCDIR"] + '/test/functional/' + test_list[0]).split() + ['-h'])
sys.exit(0) sys.exit(0)
run_tests(test_list, config["environment"]["SRCDIR"], config["environment"]["BUILDDIR"], config["environment"]["EXEEXT"], args.jobs, args.coverage, passon_args) run_tests(test_list, config["environment"]["SRCDIR"], config["environment"]["BUILDDIR"], config["environment"]["EXEEXT"], args.jobs, args.coverage, passon_args)
@ -222,7 +222,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
if "BITCOIND" not in os.environ: if "BITCOIND" not in os.environ:
os.environ["BITCOIND"] = build_dir + '/src/bitcoind' + exeext os.environ["BITCOIND"] = build_dir + '/src/bitcoind' + exeext
tests_dir = src_dir + '/test/rpc-tests/' tests_dir = src_dir + '/test/functional/'
flags = ["--srcdir={}/src".format(build_dir)] + args flags = ["--srcdir={}/src".format(build_dir)] + args
flags.append("--cachedir=%s/test/cache" % build_dir) flags.append("--cachedir=%s/test/cache" % build_dir)
@ -243,7 +243,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
time_sum = 0 time_sum = 0
time0 = time.time() time0 = time.time()
job_queue = RPCTestHandler(jobs, tests_dir, test_list, flags) job_queue = TestHandler(jobs, tests_dir, test_list, flags)
max_len_name = len(max(test_list, key=len)) max_len_name = len(max(test_list, key=len))
results = BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "PASSED", "DURATION") + BOLD[0] results = BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "PASSED", "DURATION") + BOLD[0]
@ -271,7 +271,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
sys.exit(not all_passed) sys.exit(not all_passed)
class RPCTestHandler: class TestHandler:
""" """
Trigger the testscrips passed in via the list. Trigger the testscrips passed in via the list.
""" """
@ -335,7 +335,7 @@ class RPCCoverage(object):
After all tests complete, the commands run are combined and diff'd against After all tests complete, the commands run are combined and diff'd against
the complete list to calculate uncovered RPC commands. the complete list to calculate uncovered RPC commands.
See also: test/rpc-tests/test_framework/coverage.py See also: test/functional/test_framework/coverage.py
""" """
def __init__(self): def __init__(self):
@ -363,7 +363,7 @@ class RPCCoverage(object):
Return a set of currently untested RPC commands. Return a set of currently untested RPC commands.
""" """
# This is shared from `test/rpc-tests/test-framework/coverage.py` # This is shared from `test/functional/test-framework/coverage.py`
reference_filename = 'rpc_interface.txt' reference_filename = 'rpc_interface.txt'
coverage_file_prefix = 'coverage.' coverage_file_prefix = 'coverage.'

Loading…
Cancel
Save