Browse Source

cmdtest.py regtest: cleanups

The MMGen Project 6 months ago
parent
commit
647c7a2601
3 changed files with 10 additions and 7 deletions
  1. 4 3
      mmgen/proto/btc/regtest.py
  2. 4 2
      test/cmdtest_py_d/ct_regtest.py
  3. 2 2
      test/test-release.d/cfg.sh

+ 4 - 3
mmgen/proto/btc/regtest.py

@@ -169,7 +169,7 @@ class MMGenRegtest(MMGenObject):
 
 		# BCH and LTC daemons refuse to set HD seed with empty blockchain ("in IBD" error),
 		# so generate a block:
-		await self.generate(1,silent=False)
+		await self.generate(1)
 
 		# Unfortunately, we don’t get deterministic output with BCH and LTC even with fixed
 		# hdseed, as their 'sendtoaddress' calls produce non-deterministic TXIDs due to random
@@ -182,8 +182,9 @@ class MMGenRegtest(MMGenObject):
 				wallet = 'miner')
 
 		# Broken litecoind can only mine 431 blocks in regtest mode, so generate just enough
-		# blocks to fund the test suite
-		await self.generate(392,silent=True)
+		# blocks to fund the test suite.  Generation is slow, so divide into chunks:
+		for n in (100, 100, 100, 92): # 392 blocks
+			await self.generate(n)
 
 		gmsg('Setup complete')
 

+ 4 - 2
test/cmdtest_py_d/ct_regtest.py

@@ -531,8 +531,10 @@ class CmdTestRegtest(CmdTestBase,CmdTestShared):
 			'mmgen-regtest',
 			(['--bdb-wallet'] if self.use_bdb_wallet else [])
 			+ ['--setup-no-stop-daemon', 'setup'])
-		for s in ('Starting','Creating','Creating','Creating','Mined','Setup complete'):
-			t.expect(s)
+		t.expect('Starting')
+		for _ in range(3): t.expect('Creating')
+		for _ in range(5): t.expect('Mined')
+		t.expect('Setup complete')
 		return t
 
 	def daemon_version(self):

+ 2 - 2
test/test-release.d/cfg.sh

@@ -198,7 +198,7 @@ init_tests() {
 
 	d_bch="overall operations with emulated RPC data (Bitcoin Cash Node)"
 	t_bch="
-		- $cmdtest_py --coin=bch --exclude regtest
+		- $cmdtest_py --coin=bch --exclude regtest,autosign_automount
 		- $cmdtest_py --coin=bch --cashaddr=0 ref3_addr
 	"
 
@@ -213,7 +213,7 @@ init_tests() {
 
 	d_ltc="overall operations with emulated RPC data (Litecoin)"
 	t_ltc="
-		- $cmdtest_py --coin=ltc --exclude regtest
+		- $cmdtest_py --coin=ltc --exclude regtest,autosign_automount
 		- $cmdtest_py --coin=ltc --segwit
 		- $cmdtest_py --coin=ltc --segwit-random
 		- $cmdtest_py --coin=ltc --bech32