From ca6523d0c8a44e0b9193367d1250a7d428d61be3 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 25 Jan 2018 09:44:29 +1000 Subject: [PATCH 1/6] [tests] Rename feature_* functional tests. --- test/functional/README.md | 2 +- ...{assumevalid.py => feature_assumevalid.py} | 0 ...-sequence.py => feature_bip68_sequence.py} | 0 ...softforks.py => feature_bip9_softforks.py} | 0 ...{p2p-fullblocktest.py => feature_block.py} | 0 .../{bip65-cltv-p2p.py => feature_cltv.py} | 0 .../{conf_args.py => feature_config_args.py} | 0 ...2-113-p2p.py => feature_csv_activation.py} | 0 .../{dbcrash.py => feature_dbcrash.py} | 0 .../{bipdersig-p2p.py => feature_dersig.py} | 0 ...smartfees.py => feature_fee_estimation.py} | 0 ...adtarget.py => feature_maxuploadtarget.py} | 0 ...inchainwork.py => feature_minchainwork.py} | 0 ...ifications.py => feature_notifications.py} | 0 .../{nulldummy.py => feature_nulldummy.py} | 0 .../{proxy_test.py => feature_proxy.py} | 0 .../{pruning.py => feature_pruning.py} | 0 .../{replace-by-fee.py => feature_rbf.py} | 0 .../{reindex.py => feature_reindex.py} | 0 .../{segwit.py => feature_segwit.py} | 0 .../{uacomment.py => feature_uacomment.py} | 0 ...ning.py => feature_versionbits_warning.py} | 0 test/functional/test_runner.py | 44 +++++++++---------- 23 files changed, 23 insertions(+), 23 deletions(-) rename test/functional/{assumevalid.py => feature_assumevalid.py} (100%) rename test/functional/{bip68-sequence.py => feature_bip68_sequence.py} (100%) rename test/functional/{bip9-softforks.py => feature_bip9_softforks.py} (100%) rename test/functional/{p2p-fullblocktest.py => feature_block.py} (100%) rename test/functional/{bip65-cltv-p2p.py => feature_cltv.py} (100%) rename test/functional/{conf_args.py => feature_config_args.py} (100%) rename test/functional/{bip68-112-113-p2p.py => feature_csv_activation.py} (100%) rename test/functional/{dbcrash.py => feature_dbcrash.py} (100%) rename test/functional/{bipdersig-p2p.py => feature_dersig.py} (100%) rename test/functional/{smartfees.py => feature_fee_estimation.py} (100%) rename test/functional/{maxuploadtarget.py => feature_maxuploadtarget.py} (100%) rename test/functional/{minchainwork.py => feature_minchainwork.py} (100%) rename test/functional/{notifications.py => feature_notifications.py} (100%) rename test/functional/{nulldummy.py => feature_nulldummy.py} (100%) rename test/functional/{proxy_test.py => feature_proxy.py} (100%) rename test/functional/{pruning.py => feature_pruning.py} (100%) rename test/functional/{replace-by-fee.py => feature_rbf.py} (100%) rename test/functional/{reindex.py => feature_reindex.py} (100%) rename test/functional/{segwit.py => feature_segwit.py} (100%) rename test/functional/{uacomment.py => feature_uacomment.py} (100%) rename test/functional/{p2p-versionbits-warning.py => feature_versionbits_warning.py} (100%) diff --git a/test/functional/README.md b/test/functional/README.md index d6ce490ab..b3d34c72f 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -133,7 +133,7 @@ Each `TestInstance` consists of: acceptance is tested against the given outcome. - For examples of tests written in this framework, see - `invalidblockrequest.py` and `p2p-fullblocktest.py`. + `invalidblockrequest.py` and `feature_block.py`. ### test-framework modules 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/bip9-softforks.py b/test/functional/feature_bip9_softforks.py similarity index 100% rename from test/functional/bip9-softforks.py rename to test/functional/feature_bip9_softforks.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/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/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/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/replace-by-fee.py b/test/functional/feature_rbf.py similarity index 100% rename from test/functional/replace-by-fee.py rename to test/functional/feature_rbf.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/segwit.py b/test/functional/feature_segwit.py similarity index 100% rename from test/functional/segwit.py rename to test/functional/feature_segwit.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/test_runner.py b/test/functional/test_runner.py index b8b6ee98b..6aad0f9b9 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -58,10 +58,10 @@ BASE_SCRIPTS= [ 'wallet-hd.py', 'walletbackup.py', # vv Tests less than 5m vv - 'p2p-fullblocktest.py', + 'feature_block.py', 'fundrawtransaction.py', 'p2p-compactblocks.py', - 'segwit.py', + 'feature_segwit.py', # vv Tests less than 2m vv 'wallet.py', 'wallet-accounts.py', @@ -76,10 +76,10 @@ BASE_SCRIPTS= [ 'merkle_blocks.py', 'receivedby.py', 'abandonconflict.py', - 'bip68-112-113-p2p.py', + 'feature_csv_activation.py', 'rawtransactions.py', 'address_types.py', - 'reindex.py', + 'feature_reindex.py', # vv Tests less than 30s vv 'keypool-topup.py', 'zmq_test.py', @@ -97,7 +97,7 @@ BASE_SCRIPTS= [ 'multiwallet.py --usecli', 'httpbasics.py', 'multi_rpc.py', - 'proxy_test.py', + 'feature_proxy.py', 'signrawtransactions.py', 'disconnect_ban.py', 'decodescript.py', @@ -110,11 +110,11 @@ BASE_SCRIPTS= [ 'prioritise_transaction.py', 'invalidblockrequest.py', 'invalidtxrequest.py', - 'p2p-versionbits-warning.py', + 'feature_versionbits_warning.py', 'preciousblock.py', 'importprunedfunds.py', 'signmessages.py', - 'nulldummy.py', + 'feature_nulldummy.py', 'import-rescan.py', 'mining.py', 'bumpfee.py', @@ -122,17 +122,17 @@ BASE_SCRIPTS= [ 'listsinceblock.py', 'p2p-leaktests.py', 'wallet-encryption.py', - 'bipdersig-p2p.py', - 'bip65-cltv-p2p.py', + 'feature_dersig.py', + 'feature_cltv.py', 'uptime.py', 'resendwallettransactions.py', - 'minchainwork.py', + 'feature_minchainwork.py', 'p2p-fingerprint.py', - 'uacomment.py', + 'feature_uacomment.py', 'p2p-acceptblock.py', 'feature_logging.py', 'node_network_limited.py', - 'conf_args.py', + 'feature_config_args.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 ] @@ -140,29 +140,29 @@ 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', + 'feature_pruning.py', # 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', + 'feature_bip68_sequence.py', 'getblocktemplate_longpoll.py', 'p2p-timeouts.py', # vv Tests less than 60s vv - 'bip9-softforks.py', + 'feature_bip9_softforks.py', 'p2p-feefilter.py', 'rpcbind_test.py', # vv Tests less than 30s vv - 'assumevalid.py', + 'feature_assumevalid.py', 'example_test.py', 'txn_doublespend.py', 'txn_clone.py --mineblock', - 'notifications.py', + 'feature_notifications.py', 'invalidateblock.py', - 'replace-by-fee.py', + 'feature_rbf.py', ] # Place EXTENDED_SCRIPTS first since it has the 3 longest running tests @@ -474,7 +474,7 @@ class TestResult(): def check_script_prefixes(): """Check that no more than `EXPECTED_VIOLATION_COUNT` of the test scripts don't start with one of the allowed name prefixes.""" - EXPECTED_VIOLATION_COUNT = 77 + EXPECTED_VIOLATION_COUNT = 60 # LEEWAY is provided as a transition measure, so that pull-requests # that introduce new tests that don't conform with the naming From 90600bc7db2a8047c93bc10d403e862141ada770 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 25 Jan 2018 09:44:29 +1000 Subject: [PATCH 2/6] [tests] Rename wallet_* functional tests. --- test/functional/test_runner.py | 54 +++++++++---------- ...nconflict.py => wallet_abandonconflict.py} | 0 ...{wallet-accounts.py => wallet_accounts.py} | 0 ...dress_types.py => wallet_address_types.py} | 0 .../{walletbackup.py => wallet_backup.py} | 0 .../functional/{wallet.py => wallet_basic.py} | 0 .../{bumpfee.py => wallet_bumpfee.py} | 0 .../{disablewallet.py => wallet_disable.py} | 0 .../{wallet-dump.py => wallet_dump.py} | 0 ...let-encryption.py => wallet_encryption.py} | 0 .../functional/{wallet-hd.py => wallet_hd.py} | 0 ...port-rescan.py => wallet_import_rescan.py} | 0 .../{importmulti.py => wallet_importmulti.py} | 0 ...edfunds.py => wallet_importprunedfunds.py} | 0 .../{keypool.py => wallet_keypool.py} | 0 ...ypool-topup.py => wallet_keypool_topup.py} | 0 ...receivedby.py => wallet_listreceivedby.py} | 0 ...sinceblock.py => wallet_listsinceblock.py} | 0 .../{multiwallet.py => wallet_multiwallet.py} | 0 ....py => wallet_resendwallettransactions.py} | 0 .../{txn_clone.py => wallet_txn_clone.py} | 0 ...ublespend.py => wallet_txn_doublespend.py} | 0 ...pwallettxes.py => wallet_zapwallettxes.py} | 0 23 files changed, 27 insertions(+), 27 deletions(-) rename test/functional/{abandonconflict.py => wallet_abandonconflict.py} (100%) rename test/functional/{wallet-accounts.py => wallet_accounts.py} (100%) rename test/functional/{address_types.py => wallet_address_types.py} (100%) rename test/functional/{walletbackup.py => wallet_backup.py} (100%) rename test/functional/{wallet.py => wallet_basic.py} (100%) rename test/functional/{bumpfee.py => wallet_bumpfee.py} (100%) rename test/functional/{disablewallet.py => wallet_disable.py} (100%) rename test/functional/{wallet-dump.py => wallet_dump.py} (100%) rename test/functional/{wallet-encryption.py => wallet_encryption.py} (100%) rename test/functional/{wallet-hd.py => wallet_hd.py} (100%) rename test/functional/{import-rescan.py => wallet_import_rescan.py} (100%) rename test/functional/{importmulti.py => wallet_importmulti.py} (100%) rename test/functional/{importprunedfunds.py => wallet_importprunedfunds.py} (100%) rename test/functional/{keypool.py => wallet_keypool.py} (100%) rename test/functional/{keypool-topup.py => wallet_keypool_topup.py} (100%) rename test/functional/{receivedby.py => wallet_listreceivedby.py} (100%) rename test/functional/{listsinceblock.py => wallet_listsinceblock.py} (100%) rename test/functional/{multiwallet.py => wallet_multiwallet.py} (100%) rename test/functional/{resendwallettransactions.py => wallet_resendwallettransactions.py} (100%) rename test/functional/{txn_clone.py => wallet_txn_clone.py} (100%) rename test/functional/{txn_doublespend.py => wallet_txn_doublespend.py} (100%) rename test/functional/{zapwallettxes.py => wallet_zapwallettxes.py} (100%) diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 6aad0f9b9..edc1fed8c 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -55,46 +55,46 @@ TEST_EXIT_SKIPPED = 77 BASE_SCRIPTS= [ # Scripts that are run by the travis build process. # Longest test should go first, to favor running tests in parallel - 'wallet-hd.py', - 'walletbackup.py', + 'wallet_hd.py', + 'wallet_backup.py', # vv Tests less than 5m vv 'feature_block.py', 'fundrawtransaction.py', 'p2p-compactblocks.py', 'feature_segwit.py', # vv Tests less than 2m vv - 'wallet.py', - 'wallet-accounts.py', + 'wallet_basic.py', + 'wallet_accounts.py', 'p2p-segwit.py', - 'wallet-dump.py', + 'wallet_dump.py', 'listtransactions.py', # vv Tests less than 60s vv 'sendheaders.py', - 'zapwallettxes.py', - 'importmulti.py', + 'wallet_zapwallettxes.py', + 'wallet_importmulti.py', 'mempool_limit.py', 'merkle_blocks.py', - 'receivedby.py', - 'abandonconflict.py', + 'wallet_listreceivedby.py', + 'wallet_abandonconflict.py', 'feature_csv_activation.py', 'rawtransactions.py', - 'address_types.py', + 'wallet_address_types.py', 'feature_reindex.py', # vv Tests less than 30s vv - 'keypool-topup.py', + 'wallet_keypool_topup.py', 'zmq_test.py', 'bitcoin_cli.py', 'mempool_resurrect_test.py', - 'txn_doublespend.py --mineblock', - 'txn_clone.py', - 'txn_clone.py --segwit', + 'wallet_txn_doublespend.py --mineblock', + 'wallet_txn_clone.py', + 'wallet_txn_clone.py --segwit', 'getchaintips.py', 'rest.py', 'mempool_spendcoinbase.py', 'mempool_reorg.py', 'mempool_persist.py', - 'multiwallet.py', - 'multiwallet.py --usecli', + 'wallet_multiwallet.py', + 'wallet_multiwallet.py --usecli', 'httpbasics.py', 'multi_rpc.py', 'feature_proxy.py', @@ -103,29 +103,29 @@ BASE_SCRIPTS= [ 'decodescript.py', 'blockchain.py', 'deprecated_rpc.py', - 'disablewallet.py', + 'wallet_disable.py', 'net.py', - 'keypool.py', + 'wallet_keypool.py', 'p2p-mempool.py', 'prioritise_transaction.py', 'invalidblockrequest.py', 'invalidtxrequest.py', 'feature_versionbits_warning.py', 'preciousblock.py', - 'importprunedfunds.py', + 'wallet_importprunedfunds.py', 'signmessages.py', 'feature_nulldummy.py', - 'import-rescan.py', + 'wallet_import_rescan.py', 'mining.py', - 'bumpfee.py', + 'wallet_bumpfee.py', 'rpcnamedargs.py', - 'listsinceblock.py', + 'wallet_listsinceblock.py', 'p2p-leaktests.py', - 'wallet-encryption.py', + 'wallet_encryption.py', 'feature_dersig.py', 'feature_cltv.py', 'uptime.py', - 'resendwallettransactions.py', + 'wallet_resendwallettransactions.py', 'feature_minchainwork.py', 'p2p-fingerprint.py', 'feature_uacomment.py', @@ -158,8 +158,8 @@ EXTENDED_SCRIPTS = [ # vv Tests less than 30s vv 'feature_assumevalid.py', 'example_test.py', - 'txn_doublespend.py', - 'txn_clone.py --mineblock', + 'wallet_txn_doublespend.py', + 'wallet_txn_clone.py --mineblock', 'feature_notifications.py', 'invalidateblock.py', 'feature_rbf.py', @@ -474,7 +474,7 @@ class TestResult(): def check_script_prefixes(): """Check that no more than `EXPECTED_VIOLATION_COUNT` of the test scripts don't start with one of the allowed name prefixes.""" - EXPECTED_VIOLATION_COUNT = 60 + EXPECTED_VIOLATION_COUNT = 37 # LEEWAY is provided as a transition measure, so that pull-requests # that introduce new tests that don't conform with the naming 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/address_types.py b/test/functional/wallet_address_types.py similarity index 100% rename from test/functional/address_types.py rename to test/functional/wallet_address_types.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/bumpfee.py b/test/functional/wallet_bumpfee.py similarity index 100% rename from test/functional/bumpfee.py rename to test/functional/wallet_bumpfee.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-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 From 61b8f7f273022d3163f998ff5d66d53ca0460c8b Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 25 Jan 2018 09:44:29 +1000 Subject: [PATCH 3/6] [tests] Rename p2p_* functional tests. --- test/functional/README.md | 4 +-- ...-compactblocks.py => p2p_compactblocks.py} | 0 ...isconnect_ban.py => p2p_disconnect_ban.py} | 0 .../{p2p-feefilter.py => p2p_feefilter.py} | 0 ...{p2p-fingerprint.py => p2p_fingerprint.py} | 0 ...idblockrequest.py => p2p_invalid_block.py} | 0 ...{invalidtxrequest.py => p2p_invalid_tx.py} | 0 .../{p2p-leaktests.py => p2p_leak.py} | 0 .../{p2p-mempool.py => p2p_mempool.py} | 0 ...limited.py => p2p_node_network_limited.py} | 0 .../{p2p-segwit.py => p2p_segwit.py} | 0 .../{sendheaders.py => p2p_sendheaders.py} | 0 .../{p2p-timeouts.py => p2p_timeouts.py} | 0 ...ceptblock.py => p2p_unrequested_blocks.py} | 0 test/functional/test_runner.py | 28 +++++++++---------- 15 files changed, 16 insertions(+), 16 deletions(-) rename test/functional/{p2p-compactblocks.py => p2p_compactblocks.py} (100%) rename test/functional/{disconnect_ban.py => p2p_disconnect_ban.py} (100%) rename test/functional/{p2p-feefilter.py => p2p_feefilter.py} (100%) rename test/functional/{p2p-fingerprint.py => p2p_fingerprint.py} (100%) rename test/functional/{invalidblockrequest.py => p2p_invalid_block.py} (100%) rename test/functional/{invalidtxrequest.py => p2p_invalid_tx.py} (100%) rename test/functional/{p2p-leaktests.py => p2p_leak.py} (100%) rename test/functional/{p2p-mempool.py => p2p_mempool.py} (100%) rename test/functional/{node_network_limited.py => p2p_node_network_limited.py} (100%) rename test/functional/{p2p-segwit.py => p2p_segwit.py} (100%) rename test/functional/{sendheaders.py => p2p_sendheaders.py} (100%) rename test/functional/{p2p-timeouts.py => p2p_timeouts.py} (100%) rename test/functional/{p2p-acceptblock.py => p2p_unrequested_blocks.py} (100%) diff --git a/test/functional/README.md b/test/functional/README.md index b3d34c72f..662b4b44d 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -87,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-acceptblock.py`, `p2p-compactblocks.py`. +Examples tests are `p2p_unrequested_blocks.py`, `p2p_compactblocks.py`. #### Comptool @@ -133,7 +133,7 @@ Each `TestInstance` consists of: acceptance is tested against the given outcome. - For examples of tests written in this framework, see - `invalidblockrequest.py` and `feature_block.py`. + `p2p_invalid_block.py` and `feature_block.py`. ### test-framework modules 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-feefilter.py b/test/functional/p2p_feefilter.py similarity index 100% rename from test/functional/p2p-feefilter.py rename to test/functional/p2p_feefilter.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/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/p2p-segwit.py b/test/functional/p2p_segwit.py similarity index 100% rename from test/functional/p2p-segwit.py rename to test/functional/p2p_segwit.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/test_runner.py b/test/functional/test_runner.py index edc1fed8c..26beef5a5 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -60,16 +60,16 @@ BASE_SCRIPTS= [ # vv Tests less than 5m vv 'feature_block.py', 'fundrawtransaction.py', - 'p2p-compactblocks.py', + 'p2p_compactblocks.py', 'feature_segwit.py', # vv Tests less than 2m vv 'wallet_basic.py', 'wallet_accounts.py', - 'p2p-segwit.py', + 'p2p_segwit.py', 'wallet_dump.py', 'listtransactions.py', # vv Tests less than 60s vv - 'sendheaders.py', + 'p2p_sendheaders.py', 'wallet_zapwallettxes.py', 'wallet_importmulti.py', 'mempool_limit.py', @@ -99,17 +99,17 @@ BASE_SCRIPTS= [ 'multi_rpc.py', 'feature_proxy.py', 'signrawtransactions.py', - 'disconnect_ban.py', + 'p2p_disconnect_ban.py', 'decodescript.py', 'blockchain.py', 'deprecated_rpc.py', 'wallet_disable.py', 'net.py', 'wallet_keypool.py', - 'p2p-mempool.py', + 'p2p_mempool.py', 'prioritise_transaction.py', - 'invalidblockrequest.py', - 'invalidtxrequest.py', + 'p2p_invalid_block.py', + 'p2p_invalid_tx.py', 'feature_versionbits_warning.py', 'preciousblock.py', 'wallet_importprunedfunds.py', @@ -120,18 +120,18 @@ BASE_SCRIPTS= [ 'wallet_bumpfee.py', 'rpcnamedargs.py', 'wallet_listsinceblock.py', - 'p2p-leaktests.py', + 'p2p_leak.py', 'wallet_encryption.py', 'feature_dersig.py', 'feature_cltv.py', 'uptime.py', 'wallet_resendwallettransactions.py', 'feature_minchainwork.py', - 'p2p-fingerprint.py', + 'p2p_fingerprint.py', 'feature_uacomment.py', - 'p2p-acceptblock.py', + 'p2p_unrequested_blocks.py', 'feature_logging.py', - 'node_network_limited.py', + 'p2p_node_network_limited.py', 'feature_config_args.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 @@ -150,10 +150,10 @@ EXTENDED_SCRIPTS = [ # vv Tests less than 2m vv 'feature_bip68_sequence.py', 'getblocktemplate_longpoll.py', - 'p2p-timeouts.py', + 'p2p_timeouts.py', # vv Tests less than 60s vv 'feature_bip9_softforks.py', - 'p2p-feefilter.py', + 'p2p_feefilter.py', 'rpcbind_test.py', # vv Tests less than 30s vv 'feature_assumevalid.py', @@ -474,7 +474,7 @@ class TestResult(): def check_script_prefixes(): """Check that no more than `EXPECTED_VIOLATION_COUNT` of the test scripts don't start with one of the allowed name prefixes.""" - EXPECTED_VIOLATION_COUNT = 37 + EXPECTED_VIOLATION_COUNT = 24 # LEEWAY is provided as a transition measure, so that pull-requests # that introduce new tests that don't conform with the naming From 81b79f2c394c08e2bcf612f89a230afb60074a81 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 25 Jan 2018 09:44:29 +1000 Subject: [PATCH 4/6] [tests] Rename rpc_* functional tests. --- .../{rpcbind_test.py => rpc_bind.py} | 0 .../{blockchain.py => rpc_blockchain.py} | 0 .../{decodescript.py => rpc_decodescript.py} | 0 .../{deprecated_rpc.py => rpc_deprecated.py} | 0 ...ansaction.py => rpc_fundrawtransaction.py} | 0 .../{getchaintips.py => rpc_getchaintips.py} | 0 ...alidateblock.py => rpc_invalidateblock.py} | 0 ...ransactions.py => rpc_listtransactions.py} | 0 ...rpcnamedargs.py => rpc_named_arguments.py} | 0 test/functional/{net.py => rpc_net.py} | 0 ...{preciousblock.py => rpc_preciousblock.py} | 0 ...wtransactions.py => rpc_rawtransaction.py} | 0 .../{signmessages.py => rpc_signmessage.py} | 0 ...nsactions.py => rpc_signrawtransaction.py} | 0 .../{merkle_blocks.py => rpc_txoutproof.py} | 0 test/functional/{uptime.py => rpc_uptime.py} | 0 .../functional/{multi_rpc.py => rpc_users.py} | 0 test/functional/test_runner.py | 36 +++++++++---------- 18 files changed, 18 insertions(+), 18 deletions(-) rename test/functional/{rpcbind_test.py => rpc_bind.py} (100%) rename test/functional/{blockchain.py => rpc_blockchain.py} (100%) rename test/functional/{decodescript.py => rpc_decodescript.py} (100%) rename test/functional/{deprecated_rpc.py => rpc_deprecated.py} (100%) rename test/functional/{fundrawtransaction.py => rpc_fundrawtransaction.py} (100%) rename test/functional/{getchaintips.py => rpc_getchaintips.py} (100%) rename test/functional/{invalidateblock.py => rpc_invalidateblock.py} (100%) rename test/functional/{listtransactions.py => rpc_listtransactions.py} (100%) rename test/functional/{rpcnamedargs.py => rpc_named_arguments.py} (100%) rename test/functional/{net.py => rpc_net.py} (100%) rename test/functional/{preciousblock.py => rpc_preciousblock.py} (100%) rename test/functional/{rawtransactions.py => rpc_rawtransaction.py} (100%) rename test/functional/{signmessages.py => rpc_signmessage.py} (100%) rename test/functional/{signrawtransactions.py => rpc_signrawtransaction.py} (100%) rename test/functional/{merkle_blocks.py => rpc_txoutproof.py} (100%) rename test/functional/{uptime.py => rpc_uptime.py} (100%) rename test/functional/{multi_rpc.py => rpc_users.py} (100%) 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/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/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 26beef5a5..d93e0e018 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -59,7 +59,7 @@ BASE_SCRIPTS= [ 'wallet_backup.py', # vv Tests less than 5m vv 'feature_block.py', - 'fundrawtransaction.py', + 'rpc_fundrawtransaction.py', 'p2p_compactblocks.py', 'feature_segwit.py', # vv Tests less than 2m vv @@ -67,17 +67,17 @@ BASE_SCRIPTS= [ 'wallet_accounts.py', 'p2p_segwit.py', 'wallet_dump.py', - 'listtransactions.py', + 'rpc_listtransactions.py', # vv Tests less than 60s vv 'p2p_sendheaders.py', 'wallet_zapwallettxes.py', 'wallet_importmulti.py', 'mempool_limit.py', - 'merkle_blocks.py', + 'rpc_txoutproof.py', 'wallet_listreceivedby.py', 'wallet_abandonconflict.py', 'feature_csv_activation.py', - 'rawtransactions.py', + 'rpc_rawtransaction.py', 'wallet_address_types.py', 'feature_reindex.py', # vv Tests less than 30s vv @@ -88,7 +88,7 @@ BASE_SCRIPTS= [ 'wallet_txn_doublespend.py --mineblock', 'wallet_txn_clone.py', 'wallet_txn_clone.py --segwit', - 'getchaintips.py', + 'rpc_getchaintips.py', 'rest.py', 'mempool_spendcoinbase.py', 'mempool_reorg.py', @@ -96,35 +96,35 @@ BASE_SCRIPTS= [ 'wallet_multiwallet.py', 'wallet_multiwallet.py --usecli', 'httpbasics.py', - 'multi_rpc.py', + 'rpc_users.py', 'feature_proxy.py', - 'signrawtransactions.py', + 'rpc_signrawtransaction.py', 'p2p_disconnect_ban.py', - 'decodescript.py', - 'blockchain.py', - 'deprecated_rpc.py', + 'rpc_decodescript.py', + 'rpc_blockchain.py', + 'rpc_deprecated.py', 'wallet_disable.py', - 'net.py', + 'rpc_net.py', 'wallet_keypool.py', 'p2p_mempool.py', 'prioritise_transaction.py', 'p2p_invalid_block.py', 'p2p_invalid_tx.py', 'feature_versionbits_warning.py', - 'preciousblock.py', + 'rpc_preciousblock.py', 'wallet_importprunedfunds.py', - 'signmessages.py', + 'rpc_signmessage.py', 'feature_nulldummy.py', 'wallet_import_rescan.py', 'mining.py', 'wallet_bumpfee.py', - 'rpcnamedargs.py', + 'rpc_named_arguments.py', 'wallet_listsinceblock.py', 'p2p_leak.py', 'wallet_encryption.py', 'feature_dersig.py', 'feature_cltv.py', - 'uptime.py', + 'rpc_uptime.py', 'wallet_resendwallettransactions.py', 'feature_minchainwork.py', 'p2p_fingerprint.py', @@ -154,14 +154,14 @@ EXTENDED_SCRIPTS = [ # vv Tests less than 60s vv 'feature_bip9_softforks.py', 'p2p_feefilter.py', - 'rpcbind_test.py', + 'rpc_bind.py', # vv Tests less than 30s vv 'feature_assumevalid.py', 'example_test.py', 'wallet_txn_doublespend.py', 'wallet_txn_clone.py --mineblock', 'feature_notifications.py', - 'invalidateblock.py', + 'rpc_invalidateblock.py', 'feature_rbf.py', ] @@ -474,7 +474,7 @@ class TestResult(): def check_script_prefixes(): """Check that no more than `EXPECTED_VIOLATION_COUNT` of the test scripts don't start with one of the allowed name prefixes.""" - EXPECTED_VIOLATION_COUNT = 24 + EXPECTED_VIOLATION_COUNT = 7 # LEEWAY is provided as a transition measure, so that pull-requests # that introduce new tests that don't conform with the naming From 3150b3fea732df23c6273f43102cc64783aaee9c Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 25 Jan 2018 09:44:30 +1000 Subject: [PATCH 5/6] [tests] Rename misc functional tests. --- ...itcoin_cli.py => interface_bitcoin_cli.py} | 0 .../{httpbasics.py => interface_http.py} | 0 .../functional/{rest.py => interface_rest.py} | 0 .../{zmq_test.py => interface_zmq.py} | 0 ...resurrect_test.py => mempool_resurrect.py} | 0 ...dcoinbase.py => mempool_spend_coinbase.py} | 0 .../functional/{mining.py => mining_basic.py} | 0 ...py => mining_getblocktemplate_longpoll.py} | 0 ...ion.py => mining_prioritisetransaction.py} | 0 test/functional/test_runner.py | 20 +++++++++---------- 10 files changed, 10 insertions(+), 10 deletions(-) rename test/functional/{bitcoin_cli.py => interface_bitcoin_cli.py} (100%) rename test/functional/{httpbasics.py => interface_http.py} (100%) rename test/functional/{rest.py => interface_rest.py} (100%) rename test/functional/{zmq_test.py => interface_zmq.py} (100%) rename test/functional/{mempool_resurrect_test.py => mempool_resurrect.py} (100%) rename test/functional/{mempool_spendcoinbase.py => mempool_spend_coinbase.py} (100%) rename test/functional/{mining.py => mining_basic.py} (100%) rename test/functional/{getblocktemplate_longpoll.py => mining_getblocktemplate_longpoll.py} (100%) rename test/functional/{prioritise_transaction.py => mining_prioritisetransaction.py} (100%) 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/test_runner.py b/test/functional/test_runner.py index d93e0e018..191540696 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -82,20 +82,20 @@ BASE_SCRIPTS= [ 'feature_reindex.py', # vv Tests less than 30s vv 'wallet_keypool_topup.py', - 'zmq_test.py', - 'bitcoin_cli.py', - 'mempool_resurrect_test.py', + 'interface_zmq.py', + 'interface_bitcoin_cli.py', + 'mempool_resurrect.py', 'wallet_txn_doublespend.py --mineblock', 'wallet_txn_clone.py', 'wallet_txn_clone.py --segwit', 'rpc_getchaintips.py', - 'rest.py', - 'mempool_spendcoinbase.py', + 'interface_rest.py', + 'mempool_spend_coinbase.py', 'mempool_reorg.py', 'mempool_persist.py', 'wallet_multiwallet.py', 'wallet_multiwallet.py --usecli', - 'httpbasics.py', + 'interface_http.py', 'rpc_users.py', 'feature_proxy.py', 'rpc_signrawtransaction.py', @@ -107,7 +107,7 @@ BASE_SCRIPTS= [ 'rpc_net.py', 'wallet_keypool.py', 'p2p_mempool.py', - 'prioritise_transaction.py', + 'mining_prioritisetransaction.py', 'p2p_invalid_block.py', 'p2p_invalid_tx.py', 'feature_versionbits_warning.py', @@ -116,7 +116,7 @@ BASE_SCRIPTS= [ 'rpc_signmessage.py', 'feature_nulldummy.py', 'wallet_import_rescan.py', - 'mining.py', + 'mining_basic.py', 'wallet_bumpfee.py', 'rpc_named_arguments.py', 'wallet_listsinceblock.py', @@ -149,7 +149,7 @@ EXTENDED_SCRIPTS = [ 'feature_dbcrash.py', # vv Tests less than 2m vv 'feature_bip68_sequence.py', - 'getblocktemplate_longpoll.py', + 'mining_getblocktemplate_longpoll.py', 'p2p_timeouts.py', # vv Tests less than 60s vv 'feature_bip9_softforks.py', @@ -474,7 +474,7 @@ class TestResult(): def check_script_prefixes(): """Check that no more than `EXPECTED_VIOLATION_COUNT` of the test scripts don't start with one of the allowed name prefixes.""" - EXPECTED_VIOLATION_COUNT = 7 + EXPECTED_VIOLATION_COUNT = 0 # LEEWAY is provided as a transition measure, so that pull-requests # that introduce new tests that don't conform with the naming From 6f881cc8809e2c0d0150c47494bc37f2eb05ec66 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 25 Jan 2018 09:44:30 +1000 Subject: [PATCH 6/6] [tests] Remove EXPECTED_VIOLATION_COUNT --- test/functional/test_runner.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 191540696..98944685e 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -472,9 +472,8 @@ class TestResult(): def check_script_prefixes(): - """Check that no more than `EXPECTED_VIOLATION_COUNT` of the + """Check that at most a handful of the test scripts don't start with one of the allowed name prefixes.""" - EXPECTED_VIOLATION_COUNT = 0 # LEEWAY is provided as a transition measure, so that pull-requests # that introduce new tests that don't conform with the naming @@ -484,13 +483,10 @@ def check_script_prefixes(): 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) < EXPECTED_VIOLATION_COUNT: - print("{}HURRAY!{} Number of functional tests violating naming convention reduced!".format(BOLD[1], BOLD[0])) - print("Consider reducing EXPECTED_VIOLATION_COUNT from %d to %d" % (EXPECTED_VIOLATION_COUNT, len(bad_script_names))) - elif len(bad_script_names) > EXPECTED_VIOLATION_COUNT: - print("INFO: %d tests not meeting naming conventions (expected %d):" % (len(bad_script_names), EXPECTED_VIOLATION_COUNT)) + 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) <= EXPECTED_VIOLATION_COUNT + LEEWAY, "Too many tests not following naming convention! (%d found, expected: <= %d)" % (len(bad_script_names), EXPECTED_VIOLATION_COUNT) + 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):