diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34f47b84b7..3d56af6e7a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -113,7 +113,7 @@ builder-image: stage: test extends: .base-template variables: - INTEGRATION_TESTS_ARGS: "--extended --exclude pruning,dbcrash" + INTEGRATION_TESTS_ARGS: "--extended --exclude feature_pruning,feature_dbcrash" script: - echo "INTEGRATION_TESTS_ARGS=${INTEGRATION_TESTS_ARGS}" - ./ci/test_integrationtests.sh $INTEGRATION_TESTS_ARGS diff --git a/.travis.yml b/.travis.yml index 8ac1926932..4820ff8c2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,7 @@ runtests: &runtests - $DOCKER_RUN_IN_BUILDER ./ci/build_depends.sh - $DOCKER_RUN_IN_BUILDER ./ci/build_src.sh - $DOCKER_RUN_IN_BUILDER ./ci/test_unittests.sh - - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude pruning,dbcrash"; fi + - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi - $DOCKER_RUN_IN_BUILDER ./ci/test_integrationtests.sh --quiet --jobs=3 ${extended} builddocker: &builddocker diff --git a/test/functional/README.md b/test/functional/README.md index 1e7e0108ca..2bcd419ea0 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -27,6 +27,20 @@ don't have test cases for. `set_test_params()`, `add_options()` and `setup_xxxx()` methods at the top of the subclass, then locally-defined helper methods, then the `run_test()` method. +#### Naming guidelines + +- Name the test `_test.py`, where area can be one of the following: + - `feature` for tests for full features that aren't wallet/mining/mempool, eg `feature_rbf.py` + - `interface` for tests for other interfaces (REST, ZMQ, etc), eg `interface_rest.py` + - `mempool` for tests for mempool behaviour, eg `mempool_reorg.py` + - `mining` for tests for mining features, eg `mining_prioritisetransaction.py` + - `p2p` for tests that explicitly test the p2p interface, eg `p2p_disconnect_ban.py` + - `rpc` for tests for individual RPC methods or features, eg `rpc_listtransactions.py` + - `wallet` for tests for wallet features, eg `wallet_keypool.py` +- use an underscore to separate words + - exception: for tests for specific RPCs or command line options which don't include underscores, name the test after the exact RPC or argument name, eg `rpc_decodescript.py`, not `rpc_decode_script.py` +- Don't use the redundant word `test` in the name, eg `interface_zmq.py`, not `interface_zmq_test.py` + #### General test-writing advice - Set `self.num_nodes` to the minimum number of nodes necessary for the test. @@ -73,7 +87,7 @@ start the networking thread. (Continue with the test logic in your existing thread.) - Can be used to write tests where specific P2P protocol behavior is tested. -Examples tests are `p2p-accept-block.py`, `p2p-compactblocks.py`. +Examples tests are `p2p_unrequested_blocks.py`, `p2p_compactblocks.py`. ### test-framework modules diff --git a/test/functional/addressindex.py b/test/functional/feature_addressindex.py similarity index 100% rename from test/functional/addressindex.py rename to test/functional/feature_addressindex.py diff --git a/test/functional/assumevalid.py b/test/functional/feature_assumevalid.py similarity index 100% rename from test/functional/assumevalid.py rename to test/functional/feature_assumevalid.py diff --git a/test/functional/bip68-sequence.py b/test/functional/feature_bip68_sequence.py similarity index 100% rename from test/functional/bip68-sequence.py rename to test/functional/feature_bip68_sequence.py diff --git a/test/functional/p2p-fullblocktest.py b/test/functional/feature_block.py similarity index 100% rename from test/functional/p2p-fullblocktest.py rename to test/functional/feature_block.py diff --git a/test/functional/bip65-cltv-p2p.py b/test/functional/feature_cltv.py similarity index 100% rename from test/functional/bip65-cltv-p2p.py rename to test/functional/feature_cltv.py diff --git a/test/functional/conf_args.py b/test/functional/feature_config_args.py similarity index 100% rename from test/functional/conf_args.py rename to test/functional/feature_config_args.py diff --git a/test/functional/bip68-112-113-p2p.py b/test/functional/feature_csv_activation.py similarity index 100% rename from test/functional/bip68-112-113-p2p.py rename to test/functional/feature_csv_activation.py diff --git a/test/functional/dbcrash.py b/test/functional/feature_dbcrash.py similarity index 100% rename from test/functional/dbcrash.py rename to test/functional/feature_dbcrash.py diff --git a/test/functional/bipdersig-p2p.py b/test/functional/feature_dersig.py similarity index 100% rename from test/functional/bipdersig-p2p.py rename to test/functional/feature_dersig.py diff --git a/test/functional/dip3-deterministicmns.py b/test/functional/feature_dip3_deterministicmns.py similarity index 100% rename from test/functional/dip3-deterministicmns.py rename to test/functional/feature_dip3_deterministicmns.py diff --git a/test/functional/dip4-coinbasemerkleroots.py b/test/functional/feature_dip4_coinbasemerkleroots.py similarity index 99% rename from test/functional/dip4-coinbasemerkleroots.py rename to test/functional/feature_dip4_coinbasemerkleroots.py index ba37631820..1e99281f67 100755 --- a/test/functional/dip4-coinbasemerkleroots.py +++ b/test/functional/feature_dip4_coinbasemerkleroots.py @@ -7,7 +7,7 @@ from test_framework.test_framework import DashTestFramework from test_framework.util import assert_equal ''' -dip4-coinbasemerkleroots.py +feature_dip4_coinbasemerkleroots.py Checks DIP4 merkle roots in coinbases diff --git a/test/functional/smartfees.py b/test/functional/feature_fee_estimation.py similarity index 100% rename from test/functional/smartfees.py rename to test/functional/feature_fee_estimation.py diff --git a/test/functional/llmq-chainlocks.py b/test/functional/feature_llmq_chainlocks.py similarity index 99% rename from test/functional/llmq-chainlocks.py rename to test/functional/feature_llmq_chainlocks.py index 8645e03f09..10f1e4a77f 100755 --- a/test/functional/llmq-chainlocks.py +++ b/test/functional/feature_llmq_chainlocks.py @@ -10,7 +10,7 @@ from test_framework.test_framework import DashTestFramework from test_framework.util import * ''' -llmq-chainlocks.py +feature_llmq_chainlocks.py Checks LLMQs based ChainLocks diff --git a/test/functional/llmq-connections.py b/test/functional/feature_llmq_connections.py similarity index 99% rename from test/functional/llmq-connections.py rename to test/functional/feature_llmq_connections.py index cfc02b1c28..93d21a1239 100755 --- a/test/functional/llmq-connections.py +++ b/test/functional/feature_llmq_connections.py @@ -7,7 +7,7 @@ from test_framework.test_framework import DashTestFramework from test_framework.util import * ''' -llmq-connections.py +feature_llmq_connections.py Checks intra quorum connections diff --git a/test/functional/llmq-dkgerrors.py b/test/functional/feature_llmq_dkgerrors.py similarity index 99% rename from test/functional/llmq-dkgerrors.py rename to test/functional/feature_llmq_dkgerrors.py index 07e899e30d..41404319df 100755 --- a/test/functional/llmq-dkgerrors.py +++ b/test/functional/feature_llmq_dkgerrors.py @@ -6,7 +6,7 @@ from test_framework.test_framework import DashTestFramework ''' -llmq-dkgerrors.py +feature_llmq_dkgerrors.py Simulate and check DKG errors diff --git a/test/functional/llmq-is-cl-conflicts.py b/test/functional/feature_llmq_is_cl_conflicts.py similarity index 99% rename from test/functional/llmq-is-cl-conflicts.py rename to test/functional/feature_llmq_is_cl_conflicts.py index 5b24ca689a..8ce5ab388c 100755 --- a/test/functional/llmq-is-cl-conflicts.py +++ b/test/functional/feature_llmq_is_cl_conflicts.py @@ -11,7 +11,7 @@ from test_framework.test_framework import DashTestFramework from test_framework.util import assert_raises_rpc_error ''' -llmq-is-cl-conflicts.py +feature_llmq_is_cl_conflicts.py Checks conflict handling between ChainLocks and InstantSend diff --git a/test/functional/llmq-is-retroactive.py b/test/functional/feature_llmq_is_retroactive.py similarity index 99% rename from test/functional/llmq-is-retroactive.py rename to test/functional/feature_llmq_is_retroactive.py index ebadc7f67a..0ecd33e079 100755 --- a/test/functional/llmq-is-retroactive.py +++ b/test/functional/feature_llmq_is_retroactive.py @@ -8,7 +8,7 @@ from test_framework.test_framework import DashTestFramework from test_framework.util import set_node_times, isolate_node, reconnect_isolated_node ''' -llmq-is-retroactive.py +feature_llmq_is_retroactive.py Tests retroactive signing diff --git a/test/functional/llmq-signing.py b/test/functional/feature_llmq_signing.py similarity index 99% rename from test/functional/llmq-signing.py rename to test/functional/feature_llmq_signing.py index 512366c9d5..009291a461 100755 --- a/test/functional/llmq-signing.py +++ b/test/functional/feature_llmq_signing.py @@ -8,7 +8,7 @@ from test_framework.test_framework import DashTestFramework from test_framework.util import * ''' -llmq-signing.py +feature_llmq_signing.py Checks LLMQs signing sessions diff --git a/test/functional/llmq-simplepose.py b/test/functional/feature_llmq_simplepose.py similarity index 99% rename from test/functional/llmq-simplepose.py rename to test/functional/feature_llmq_simplepose.py index d93945cc68..800c8c31c8 100755 --- a/test/functional/llmq-simplepose.py +++ b/test/functional/feature_llmq_simplepose.py @@ -9,7 +9,7 @@ from test_framework.test_framework import DashTestFramework from test_framework.util import * ''' -llmq-simplepose.py +feature_llmq_simplepose.py Checks simple PoSe system based on LLMQ commitments diff --git a/test/functional/maxuploadtarget.py b/test/functional/feature_maxuploadtarget.py similarity index 100% rename from test/functional/maxuploadtarget.py rename to test/functional/feature_maxuploadtarget.py diff --git a/test/functional/minchainwork.py b/test/functional/feature_minchainwork.py similarity index 100% rename from test/functional/minchainwork.py rename to test/functional/feature_minchainwork.py diff --git a/test/functional/multikeysporks.py b/test/functional/feature_multikeysporks.py similarity index 99% rename from test/functional/multikeysporks.py rename to test/functional/feature_multikeysporks.py index d5aa6eb9e8..a229f00f3d 100755 --- a/test/functional/multikeysporks.py +++ b/test/functional/feature_multikeysporks.py @@ -8,7 +8,7 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import connect_nodes, wait_until ''' -multikeysporks.py +feature_multikeysporks.py Test logic for several signer keys usage for spork broadcast. diff --git a/test/functional/notifications.py b/test/functional/feature_notifications.py similarity index 100% rename from test/functional/notifications.py rename to test/functional/feature_notifications.py diff --git a/test/functional/nulldummy.py b/test/functional/feature_nulldummy.py similarity index 100% rename from test/functional/nulldummy.py rename to test/functional/feature_nulldummy.py diff --git a/test/functional/proxy_test.py b/test/functional/feature_proxy.py similarity index 100% rename from test/functional/proxy_test.py rename to test/functional/feature_proxy.py diff --git a/test/functional/pruning.py b/test/functional/feature_pruning.py similarity index 100% rename from test/functional/pruning.py rename to test/functional/feature_pruning.py diff --git a/test/functional/reindex.py b/test/functional/feature_reindex.py similarity index 100% rename from test/functional/reindex.py rename to test/functional/feature_reindex.py diff --git a/test/functional/spentindex.py b/test/functional/feature_spentindex.py similarity index 100% rename from test/functional/spentindex.py rename to test/functional/feature_spentindex.py diff --git a/test/functional/sporks.py b/test/functional/feature_sporks.py similarity index 100% rename from test/functional/sporks.py rename to test/functional/feature_sporks.py diff --git a/test/functional/timestampindex.py b/test/functional/feature_timestampindex.py similarity index 100% rename from test/functional/timestampindex.py rename to test/functional/feature_timestampindex.py diff --git a/test/functional/txindex.py b/test/functional/feature_txindex.py similarity index 100% rename from test/functional/txindex.py rename to test/functional/feature_txindex.py diff --git a/test/functional/uacomment.py b/test/functional/feature_uacomment.py similarity index 100% rename from test/functional/uacomment.py rename to test/functional/feature_uacomment.py diff --git a/test/functional/p2p-versionbits-warning.py b/test/functional/feature_versionbits_warning.py similarity index 100% rename from test/functional/p2p-versionbits-warning.py rename to test/functional/feature_versionbits_warning.py diff --git a/test/functional/bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py similarity index 100% rename from test/functional/bitcoin_cli.py rename to test/functional/interface_bitcoin_cli.py diff --git a/test/functional/httpbasics.py b/test/functional/interface_http.py similarity index 100% rename from test/functional/httpbasics.py rename to test/functional/interface_http.py diff --git a/test/functional/rest.py b/test/functional/interface_rest.py similarity index 100% rename from test/functional/rest.py rename to test/functional/interface_rest.py diff --git a/test/functional/zmq_test.py b/test/functional/interface_zmq.py similarity index 100% rename from test/functional/zmq_test.py rename to test/functional/interface_zmq.py diff --git a/test/functional/mempool_resurrect_test.py b/test/functional/mempool_resurrect.py similarity index 100% rename from test/functional/mempool_resurrect_test.py rename to test/functional/mempool_resurrect.py diff --git a/test/functional/mempool_spendcoinbase.py b/test/functional/mempool_spend_coinbase.py similarity index 100% rename from test/functional/mempool_spendcoinbase.py rename to test/functional/mempool_spend_coinbase.py diff --git a/test/functional/mining.py b/test/functional/mining_basic.py similarity index 100% rename from test/functional/mining.py rename to test/functional/mining_basic.py diff --git a/test/functional/getblocktemplate_longpoll.py b/test/functional/mining_getblocktemplate_longpoll.py similarity index 100% rename from test/functional/getblocktemplate_longpoll.py rename to test/functional/mining_getblocktemplate_longpoll.py diff --git a/test/functional/prioritise_transaction.py b/test/functional/mining_prioritisetransaction.py similarity index 100% rename from test/functional/prioritise_transaction.py rename to test/functional/mining_prioritisetransaction.py diff --git a/test/functional/p2p-compactblocks.py b/test/functional/p2p_compactblocks.py similarity index 100% rename from test/functional/p2p-compactblocks.py rename to test/functional/p2p_compactblocks.py diff --git a/test/functional/disconnect_ban.py b/test/functional/p2p_disconnect_ban.py similarity index 100% rename from test/functional/disconnect_ban.py rename to test/functional/p2p_disconnect_ban.py diff --git a/test/functional/p2p-fingerprint.py b/test/functional/p2p_fingerprint.py similarity index 100% rename from test/functional/p2p-fingerprint.py rename to test/functional/p2p_fingerprint.py diff --git a/test/functional/p2p-instantsend.py b/test/functional/p2p_instantsend.py similarity index 99% rename from test/functional/p2p-instantsend.py rename to test/functional/p2p_instantsend.py index 40a1d0ef0e..3b45f52eb7 100755 --- a/test/functional/p2p-instantsend.py +++ b/test/functional/p2p_instantsend.py @@ -9,7 +9,7 @@ from test_framework.util import isolate_node, reconnect_isolated_node, assert_eq assert_raises_rpc_error ''' -p2p-instantsend.py +p2p_instantsend.py Tests InstantSend functionality (prevent doublespend for unconfirmed transactions) ''' diff --git a/test/functional/invalidblockrequest.py b/test/functional/p2p_invalid_block.py similarity index 100% rename from test/functional/invalidblockrequest.py rename to test/functional/p2p_invalid_block.py diff --git a/test/functional/invalidtxrequest.py b/test/functional/p2p_invalid_tx.py similarity index 100% rename from test/functional/invalidtxrequest.py rename to test/functional/p2p_invalid_tx.py diff --git a/test/functional/p2p-leaktests.py b/test/functional/p2p_leak.py similarity index 100% rename from test/functional/p2p-leaktests.py rename to test/functional/p2p_leak.py diff --git a/test/functional/p2p-mempool.py b/test/functional/p2p_mempool.py similarity index 100% rename from test/functional/p2p-mempool.py rename to test/functional/p2p_mempool.py diff --git a/test/functional/node_network_limited.py b/test/functional/p2p_node_network_limited.py similarity index 100% rename from test/functional/node_network_limited.py rename to test/functional/p2p_node_network_limited.py diff --git a/test/functional/sendheaders.py b/test/functional/p2p_sendheaders.py similarity index 100% rename from test/functional/sendheaders.py rename to test/functional/p2p_sendheaders.py diff --git a/test/functional/p2p-timeouts.py b/test/functional/p2p_timeouts.py similarity index 100% rename from test/functional/p2p-timeouts.py rename to test/functional/p2p_timeouts.py diff --git a/test/functional/p2p-acceptblock.py b/test/functional/p2p_unrequested_blocks.py similarity index 100% rename from test/functional/p2p-acceptblock.py rename to test/functional/p2p_unrequested_blocks.py diff --git a/test/functional/rpcbind_test.py b/test/functional/rpc_bind.py similarity index 100% rename from test/functional/rpcbind_test.py rename to test/functional/rpc_bind.py diff --git a/test/functional/blockchain.py b/test/functional/rpc_blockchain.py similarity index 100% rename from test/functional/blockchain.py rename to test/functional/rpc_blockchain.py diff --git a/test/functional/decodescript.py b/test/functional/rpc_decodescript.py similarity index 100% rename from test/functional/decodescript.py rename to test/functional/rpc_decodescript.py diff --git a/test/functional/deprecated_rpc.py b/test/functional/rpc_deprecated.py similarity index 100% rename from test/functional/deprecated_rpc.py rename to test/functional/rpc_deprecated.py diff --git a/test/functional/fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py similarity index 100% rename from test/functional/fundrawtransaction.py rename to test/functional/rpc_fundrawtransaction.py diff --git a/test/functional/fundrawtransaction-hd.py b/test/functional/rpc_fundrawtransaction_hd.py similarity index 100% rename from test/functional/fundrawtransaction-hd.py rename to test/functional/rpc_fundrawtransaction_hd.py diff --git a/test/functional/getchaintips.py b/test/functional/rpc_getchaintips.py similarity index 100% rename from test/functional/getchaintips.py rename to test/functional/rpc_getchaintips.py diff --git a/test/functional/invalidateblock.py b/test/functional/rpc_invalidateblock.py similarity index 100% rename from test/functional/invalidateblock.py rename to test/functional/rpc_invalidateblock.py diff --git a/test/functional/listtransactions.py b/test/functional/rpc_listtransactions.py similarity index 100% rename from test/functional/listtransactions.py rename to test/functional/rpc_listtransactions.py diff --git a/test/functional/rpcnamedargs.py b/test/functional/rpc_named_arguments.py similarity index 100% rename from test/functional/rpcnamedargs.py rename to test/functional/rpc_named_arguments.py diff --git a/test/functional/net.py b/test/functional/rpc_net.py similarity index 100% rename from test/functional/net.py rename to test/functional/rpc_net.py diff --git a/test/functional/preciousblock.py b/test/functional/rpc_preciousblock.py similarity index 100% rename from test/functional/preciousblock.py rename to test/functional/rpc_preciousblock.py diff --git a/test/functional/privatesend.py b/test/functional/rpc_privatesend.py similarity index 99% rename from test/functional/privatesend.py rename to test/functional/rpc_privatesend.py index f30fefabd9..329d206912 100755 --- a/test/functional/privatesend.py +++ b/test/functional/rpc_privatesend.py @@ -7,7 +7,7 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal ''' -privatesend.py +rpc_privatesend.py Tests PrivateSend basic RPC ''' diff --git a/test/functional/rawtransactions.py b/test/functional/rpc_rawtransaction.py similarity index 100% rename from test/functional/rawtransactions.py rename to test/functional/rpc_rawtransaction.py diff --git a/test/functional/signmessages.py b/test/functional/rpc_signmessage.py similarity index 100% rename from test/functional/signmessages.py rename to test/functional/rpc_signmessage.py diff --git a/test/functional/signrawtransactions.py b/test/functional/rpc_signrawtransaction.py similarity index 100% rename from test/functional/signrawtransactions.py rename to test/functional/rpc_signrawtransaction.py diff --git a/test/functional/merkle_blocks.py b/test/functional/rpc_txoutproof.py similarity index 100% rename from test/functional/merkle_blocks.py rename to test/functional/rpc_txoutproof.py diff --git a/test/functional/uptime.py b/test/functional/rpc_uptime.py similarity index 100% rename from test/functional/uptime.py rename to test/functional/rpc_uptime.py diff --git a/test/functional/multi_rpc.py b/test/functional/rpc_users.py similarity index 100% rename from test/functional/multi_rpc.py rename to test/functional/rpc_users.py diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 29b569beec..8b9c6ca989 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -58,103 +58,104 @@ TRAVIS_TIMEOUT_DURATION = 20 * 60 BASE_SCRIPTS= [ # Scripts that are run by the travis build process. # Longest test should go first, to favor running tests in parallel - 'dip3-deterministicmns.py', # NOTE: needs dash_hash to pass - 'wallet-hd.py', - 'walletbackup.py', + 'feature_dip3_deterministicmns.py', # NOTE: needs dash_hash to pass + 'wallet_hd.py', + 'wallet_backup.py', # vv Tests less than 5m vv - 'p2p-fullblocktest.py', # NOTE: needs dash_hash to pass - 'fundrawtransaction.py', - 'fundrawtransaction-hd.py', + 'feature_block.py', # NOTE: needs dash_hash to pass + 'rpc_fundrawtransaction.py', + 'rpc_fundrawtransaction_hd.py', # vv Tests less than 2m vv - 'p2p-instantsend.py', - 'wallet.py', - 'wallet-accounts.py', - 'wallet-dump.py', - 'listtransactions.py', - 'multikeysporks.py', - 'llmq-signing.py', # NOTE: needs dash_hash to pass - 'llmq-signing.py --spork21', # NOTE: needs dash_hash to pass - 'llmq-chainlocks.py', # NOTE: needs dash_hash to pass - 'llmq-connections.py', # NOTE: needs dash_hash to pass - 'llmq-simplepose.py', # NOTE: needs dash_hash to pass - 'llmq-is-cl-conflicts.py', # NOTE: needs dash_hash to pass - 'llmq-is-retroactive.py', # NOTE: needs dash_hash to pass - 'llmq-dkgerrors.py', # NOTE: needs dash_hash to pass - 'dip4-coinbasemerkleroots.py', # NOTE: needs dash_hash to pass + 'p2p_instantsend.py', + 'wallet_basic.py', + 'wallet_accounts.py', + 'wallet_dump.py', + 'rpc_listtransactions.py', + 'feature_multikeysporks.py', + 'feature_llmq_signing.py', # NOTE: needs dash_hash to pass + 'feature_llmq_signing.py --spork21', # NOTE: needs dash_hash to pass + 'feature_llmq_chainlocks.py', # NOTE: needs dash_hash to pass + 'feature_llmq_connections.py', # NOTE: needs dash_hash to pass + 'feature_llmq_simplepose.py', # NOTE: needs dash_hash to pass + 'feature_llmq_is_cl_conflicts.py', # NOTE: needs dash_hash to pass + 'feature_llmq_is_retroactive.py', # NOTE: needs dash_hash to pass + 'feature_llmq_dkgerrors.py', # NOTE: needs dash_hash to pass + 'feature_dip4_coinbasemerkleroots.py', # NOTE: needs dash_hash to pass # vv Tests less than 60s vv - 'sendheaders.py', # NOTE: needs dash_hash to pass - 'zapwallettxes.py', - 'importmulti.py', + 'p2p_sendheaders.py', # NOTE: needs dash_hash to pass + 'wallet_zapwallettxes.py', + 'wallet_importmulti.py', 'mempool_limit.py', - 'merkle_blocks.py', - 'receivedby.py', - 'abandonconflict.py', - 'bip68-112-113-p2p.py', - 'rawtransactions.py', - 'reindex.py', + 'rpc_txoutproof.py', + 'wallet_listreceivedby.py', + 'wallet_abandonconflict.py', + 'feature_csv_activation.py', + 'rpc_rawtransaction.py', + 'feature_reindex.py', # vv Tests less than 30s vv - 'keypool-topup.py', - 'zmq_test.py', - 'bitcoin_cli.py', - 'mempool_resurrect_test.py', - 'txn_doublespend.py --mineblock', - 'txn_clone.py', - 'getchaintips.py', - 'rest.py', - 'mempool_spendcoinbase.py', + 'wallet_keypool_topup.py', + 'interface_zmq.py', + 'interface_bitcoin_cli.py', + 'mempool_resurrect.py', + 'wallet_txn_doublespend.py --mineblock', + 'wallet_txn_clone.py', + 'rpc_getchaintips.py', + 'interface_rest.py', + 'mempool_spend_coinbase.py', 'mempool_reorg.py', 'mempool_persist.py', - 'multiwallet.py', - 'multiwallet.py --usecli', - 'httpbasics.py', - 'multi_rpc.py', - 'proxy_test.py', - 'signrawtransactions.py', - 'disconnect_ban.py', - 'addressindex.py', - 'timestampindex.py', - 'spentindex.py', - 'decodescript.py', - 'blockchain.py', - 'deprecated_rpc.py', - 'disablewallet.py', - 'net.py', - 'keypool.py', - 'keypool-hd.py', - 'p2p-mempool.py', - 'prioritise_transaction.py', - 'invalidblockrequest.py', # NOTE: needs dash_hash to pass - 'invalidtxrequest.py', # NOTE: needs dash_hash to pass - 'p2p-versionbits-warning.py', - 'preciousblock.py', - 'importprunedfunds.py', - 'signmessages.py', - 'nulldummy.py', - 'import-rescan.py', - 'rpcbind_test.py --ipv4', - 'rpcbind_test.py --ipv6', - 'rpcbind_test.py --nonloopback', - 'mining.py', - 'rpcnamedargs.py', - 'listsinceblock.py', - 'p2p-leaktests.py', - 'p2p-compactblocks.py', - 'sporks.py', + 'wallet_multiwallet.py', + 'wallet_multiwallet.py --usecli', + 'interface_http.py', + 'rpc_users.py', + 'feature_proxy.py', + 'rpc_signrawtransaction.py', + 'p2p_disconnect_ban.py', + 'feature_addressindex.py', + 'feature_timestampindex.py', + 'feature_spentindex.py', + 'rpc_decodescript.py', + 'rpc_blockchain.py', + 'rpc_deprecated.py', + 'wallet_disable.py', + 'rpc_net.py', + 'wallet_keypool.py', + 'wallet_keypool_hd.py', + 'p2p_mempool.py', + 'mining_prioritisetransaction.py', + 'p2p_invalid_block.py', + 'p2p_invalid_tx.py', + 'feature_versionbits_warning.py', + 'rpc_preciousblock.py', + 'wallet_importprunedfunds.py', + 'rpc_signmessage.py', + 'feature_nulldummy.py', + 'wallet_import_rescan.py', + 'rpc_bind.py --ipv4', + 'rpc_bind.py --ipv6', + 'rpc_bind.py --nonloopback', + 'mining_basic.py', + 'rpc_named_arguments.py', + 'wallet_listsinceblock.py', + 'p2p_leak.py', + 'p2p_compactblocks.py', + 'feature_sporks.py', 'rpc_getblockstats.py', - 'p2p-fingerprint.py', - 'wallet-encryption.py', - 'bipdersig-p2p.py', - 'bip65-cltv-p2p.py', - 'uptime.py', - 'resendwallettransactions.py', - 'minchainwork.py', - 'p2p-acceptblock.py', # NOTE: needs dash_hash to pass + 'wallet_encryption.py', + 'feature_dersig.py', + 'feature_cltv.py', + 'rpc_uptime.py', + 'wallet_resendwallettransactions.py', + 'feature_minchainwork.py', + 'p2p_unrequested_blocks.py', # NOTE: needs dash_hash to pass 'feature_shutdown.py', - 'privatesend.py', - 'uacomment.py', + 'rpc_privatesend.py', + 'p2p_fingerprint.py', + 'feature_uacomment.py', + 'p2p_unrequested_blocks.py', 'feature_logging.py', - 'node_network_limited.py', - 'conf_args.py', + 'p2p_node_network_limited.py', + 'feature_config_args.py', 'feature_help.py', # Don't append tests at the end to avoid merge conflicts # Put them in a random line within the section that fits their approximate run-time @@ -163,26 +164,26 @@ BASE_SCRIPTS= [ EXTENDED_SCRIPTS = [ # These tests are not run by the travis build process. # Longest test should go first, to favor running tests in parallel - 'pruning.py', # NOTE: Prune mode is incompatible with -txindex, should work governance validation disabled though. + 'feature_pruning.py', # NOTE: Prune mode is incompatible with -txindex, should work with governance validation disabled though. # vv Tests less than 20m vv - 'smartfees.py', + 'feature_fee_estimation.py', # vv Tests less than 5m vv - 'maxuploadtarget.py', + 'feature_maxuploadtarget.py', 'mempool_packages.py', - 'dbcrash.py', + 'feature_dbcrash.py', # vv Tests less than 2m vv - 'bip68-sequence.py', - 'getblocktemplate_longpoll.py', # FIXME: "socket.error: [Errno 54] Connection reset by peer" on my Mac, same as https://github.com/bitcoin/bitcoin/issues/6651 - 'p2p-timeouts.py', + 'feature_bip68_sequence.py', + 'mining_getblocktemplate_longpoll.py', # FIXME: "socket.error: [Errno 54] Connection reset by peer" on my Mac, same as https://github.com/bitcoin/bitcoin/issues/6651 + 'p2p_timeouts.py', # vv Tests less than 60s vv # vv Tests less than 30s vv - 'assumevalid.py', + 'feature_assumevalid.py', 'example_test.py', - 'txn_doublespend.py', - 'txn_clone.py --mineblock', - 'txindex.py', - 'notifications.py', - 'invalidateblock.py', + 'wallet_txn_doublespend.py', + 'wallet_txn_clone.py --mineblock', + 'feature_txindex.py', + 'feature_notifications.py', + 'rpc_invalidateblock.py', ] # Place EXTENDED_SCRIPTS first since it has the 3 longest running tests @@ -292,6 +293,7 @@ def main(): sys.exit(0) check_script_list(src_dir=config["environment"]["SRCDIR"], fail_on_warn=args.ci) + check_script_prefixes() if not args.keepcache: shutil.rmtree("%s/test/cache" % config["environment"]["BUILDDIR"], ignore_errors=True) @@ -532,6 +534,24 @@ class TestResult(): return self.status != "Failed" +def check_script_prefixes(): + """Check that at most a handful of the + test scripts don't start with one of the allowed name prefixes.""" + + # LEEWAY is provided as a transition measure, so that pull-requests + # that introduce new tests that don't conform with the naming + # convention don't immediately cause the tests to fail. + LEEWAY = 10 + + good_prefixes_re = re.compile("(example|feature|interface|mempool|mining|p2p|rpc|wallet)_") + bad_script_names = [script for script in ALL_SCRIPTS if good_prefixes_re.match(script) is None] + + if len(bad_script_names) > 0: + print("INFO: %d tests not meeting naming conventions:" % (len(bad_script_names))) + print(" %s" % ("\n ".join(sorted(bad_script_names)))) + assert len(bad_script_names) <= LEEWAY, "Too many tests not following naming convention! (%d found, maximum: %d)" % (len(bad_script_names), LEEWAY) + + def check_script_list(*, src_dir, fail_on_warn): """Check scripts directory. diff --git a/test/functional/abandonconflict.py b/test/functional/wallet_abandonconflict.py similarity index 100% rename from test/functional/abandonconflict.py rename to test/functional/wallet_abandonconflict.py diff --git a/test/functional/wallet-accounts.py b/test/functional/wallet_accounts.py similarity index 100% rename from test/functional/wallet-accounts.py rename to test/functional/wallet_accounts.py diff --git a/test/functional/walletbackup.py b/test/functional/wallet_backup.py similarity index 100% rename from test/functional/walletbackup.py rename to test/functional/wallet_backup.py diff --git a/test/functional/wallet.py b/test/functional/wallet_basic.py similarity index 100% rename from test/functional/wallet.py rename to test/functional/wallet_basic.py diff --git a/test/functional/disablewallet.py b/test/functional/wallet_disable.py similarity index 100% rename from test/functional/disablewallet.py rename to test/functional/wallet_disable.py diff --git a/test/functional/wallet-dump.py b/test/functional/wallet_dump.py similarity index 100% rename from test/functional/wallet-dump.py rename to test/functional/wallet_dump.py diff --git a/test/functional/wallet-encryption.py b/test/functional/wallet_encryption.py similarity index 100% rename from test/functional/wallet-encryption.py rename to test/functional/wallet_encryption.py diff --git a/test/functional/wallet-hd.py b/test/functional/wallet_hd.py similarity index 100% rename from test/functional/wallet-hd.py rename to test/functional/wallet_hd.py diff --git a/test/functional/import-rescan.py b/test/functional/wallet_import_rescan.py similarity index 100% rename from test/functional/import-rescan.py rename to test/functional/wallet_import_rescan.py diff --git a/test/functional/importmulti.py b/test/functional/wallet_importmulti.py similarity index 100% rename from test/functional/importmulti.py rename to test/functional/wallet_importmulti.py diff --git a/test/functional/importprunedfunds.py b/test/functional/wallet_importprunedfunds.py similarity index 100% rename from test/functional/importprunedfunds.py rename to test/functional/wallet_importprunedfunds.py diff --git a/test/functional/keypool.py b/test/functional/wallet_keypool.py similarity index 100% rename from test/functional/keypool.py rename to test/functional/wallet_keypool.py diff --git a/test/functional/keypool-hd.py b/test/functional/wallet_keypool_hd.py similarity index 100% rename from test/functional/keypool-hd.py rename to test/functional/wallet_keypool_hd.py diff --git a/test/functional/keypool-topup.py b/test/functional/wallet_keypool_topup.py similarity index 100% rename from test/functional/keypool-topup.py rename to test/functional/wallet_keypool_topup.py diff --git a/test/functional/receivedby.py b/test/functional/wallet_listreceivedby.py similarity index 100% rename from test/functional/receivedby.py rename to test/functional/wallet_listreceivedby.py diff --git a/test/functional/listsinceblock.py b/test/functional/wallet_listsinceblock.py similarity index 100% rename from test/functional/listsinceblock.py rename to test/functional/wallet_listsinceblock.py diff --git a/test/functional/multiwallet.py b/test/functional/wallet_multiwallet.py similarity index 100% rename from test/functional/multiwallet.py rename to test/functional/wallet_multiwallet.py diff --git a/test/functional/resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py similarity index 100% rename from test/functional/resendwallettransactions.py rename to test/functional/wallet_resendwallettransactions.py diff --git a/test/functional/txn_clone.py b/test/functional/wallet_txn_clone.py similarity index 100% rename from test/functional/txn_clone.py rename to test/functional/wallet_txn_clone.py diff --git a/test/functional/txn_doublespend.py b/test/functional/wallet_txn_doublespend.py similarity index 100% rename from test/functional/txn_doublespend.py rename to test/functional/wallet_txn_doublespend.py diff --git a/test/functional/zapwallettxes.py b/test/functional/wallet_zapwallettxes.py similarity index 100% rename from test/functional/zapwallettxes.py rename to test/functional/wallet_zapwallettxes.py