Skip to content

Commit 288ddf4

Browse files
committed
Merge #14180: qa: Run all tests even if wallet is not compiled
fac9539 qa: Run all tests even if wallet is not compiled (MarcoFalke) faa669c qa: Premine to deterministic address with -disablewallet (MarcoFalke) Pull request description: Currently the test_runner would exit if the wallet was not compiled into the Bitcoin Core executable. However, a lot of the tests run without the wallet just fine and there is no need to globally require the wallet to run the tests. Tree-SHA512: 63177260aa29126fd20f0be217a82b10b62288ab846f96f1cbcc3bd2c52702437703475d91eae3f8d821a3149fc62b725a4c5b2a7b3657b67ffcbc81532a03bb
2 parents 37b836a + fac9539 commit 288ddf4

File tree

86 files changed

+502
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+502
-133
lines changed

test/functional/example_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ def custom_function():
6767
# self.log.info("running custom_function") # Oops! Can't run self.log outside the BitcoinTestFramework
6868
pass
6969

70+
7071
class ExampleTest(BitcoinTestFramework):
7172
# Each functional test is a subclass of the BitcoinTestFramework class.
7273

73-
# Override the set_test_params(), add_options(), setup_chain(), setup_network()
74+
# Override the set_test_params(), skip_test_if_missing_module(), add_options(), setup_chain(), setup_network()
7475
# and setup_nodes() methods to customize the test setup as required.
7576

7677
def set_test_params(self):
@@ -84,6 +85,9 @@ def set_test_params(self):
8485

8586
# self.log.info("I've finished set_test_params") # Oops! Can't run self.log before run_test()
8687

88+
def skip_test_if_missing_module(self):
89+
self.skip_if_no_wallet()
90+
8791
# Use add_options() to add specific command-line options for your test.
8892
# In practice this is not used very much, since the tests are mostly written
8993
# to be run in automated environments without command-line options.

test/functional/feature_bip68_sequence.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ def set_test_params(self):
2525
self.num_nodes = 2
2626
self.extra_args = [[], ["-acceptnonstdtxn=0"]]
2727

28+
def skip_test_if_missing_module(self):
29+
self.skip_if_no_wallet()
30+
2831
def run_test(self):
2932
self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"]
3033

test/functional/feature_block.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ def set_test_params(self):
7575
self.setup_clean_chain = True
7676
self.extra_args = [[]]
7777

78+
def skip_test_if_missing_module(self):
79+
self.skip_if_no_wallet()
80+
7881
def run_test(self):
7982
node = self.nodes[0] # convenience reference to the node
8083

test/functional/feature_blocksdir.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def set_test_params(self):
1616
self.setup_clean_chain = True
1717
self.num_nodes = 1
1818

19+
def skip_test_if_missing_module(self):
20+
self.skip_if_no_wallet()
21+
1922
def run_test(self):
2023
self.stop_node(0)
2124
shutil.rmtree(self.nodes[0].datadir)

test/functional/feature_cltv.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ def set_test_params(self):
6262
self.extra_args = [['-whitelist=127.0.0.1', '-par=1']] # Use only one script thread to get the exact reject reason for testing
6363
self.setup_clean_chain = True
6464

65+
def skip_test_if_missing_module(self):
66+
self.skip_if_no_wallet()
67+
6568
def run_test(self):
6669
self.nodes[0].add_p2p_connection(P2PInterface())
6770

test/functional/feature_config_args.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ def set_test_params(self):
1414
self.setup_clean_chain = True
1515
self.num_nodes = 1
1616

17+
def skip_test_if_missing_module(self):
18+
self.skip_if_no_wallet()
19+
1720
def test_config_file_parser(self):
1821
# Assume node is stopped
1922

test/functional/feature_csv_activation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ def set_test_params(self):
145145
self.setup_clean_chain = True
146146
self.extra_args = [['-whitelist=127.0.0.1', '-blockversion=4', '-addresstype=legacy']]
147147

148+
def skip_test_if_missing_module(self):
149+
self.skip_if_no_wallet()
150+
148151
def generate_blocks(self, number, version, test_blocks=None):
149152
if test_blocks is None:
150153
test_blocks = []

test/functional/feature_dbcrash.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def set_test_params(self):
6363
self.node3_args = ["-blockmaxweight=4000000"]
6464
self.extra_args = [self.node0_args, self.node1_args, self.node2_args, self.node3_args]
6565

66+
def skip_test_if_missing_module(self):
67+
self.skip_if_no_wallet()
68+
6669
def setup_network(self):
6770
self.add_nodes(self.num_nodes, extra_args=self.extra_args)
6871
self.start_nodes()

test/functional/feature_dersig.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def set_test_params(self):
4949
self.extra_args = [['-whitelist=127.0.0.1', '-par=1', '-enablebip61']] # Use only one script thread to get the exact reject reason for testing
5050
self.setup_clean_chain = True
5151

52+
def skip_test_if_missing_module(self):
53+
self.skip_if_no_wallet()
54+
5255
def run_test(self):
5356
self.nodes[0].add_p2p_connection(P2PInterface())
5457

test/functional/feature_fee_estimation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ class EstimateFeeTest(BitcoinTestFramework):
126126
def set_test_params(self):
127127
self.num_nodes = 3
128128

129+
def skip_test_if_missing_module(self):
130+
self.skip_if_no_wallet()
131+
129132
def setup_network(self):
130133
"""
131134
We'll setup the network to have 3 nodes that all mine with different parameters.
@@ -168,6 +171,11 @@ def transact_and_mine(self, numblocks, mining_node):
168171
newmem.append(utx)
169172
self.memutxo = newmem
170173

174+
def import_deterministic_coinbase_privkeys(self):
175+
self.start_nodes()
176+
super().import_deterministic_coinbase_privkeys()
177+
self.stop_nodes()
178+
171179
def run_test(self):
172180
self.log.info("This test is time consuming, please be patient")
173181
self.log.info("Splitting inputs so we can generate tx's")

0 commit comments

Comments
 (0)