Browse Source

minor testing fixes

The MMGen Project 9 months ago
parent
commit
81c822dd95

+ 1 - 0
test/cmdtest_py_d/ct_automount.py

@@ -245,6 +245,7 @@ class CmdTestAutosignAutomount(CmdTestAutosignThreaded, CmdTestRegtestBDBWallet)
 				['--alice', '--autosign'],
 				exit_val = 1 if bad_tx_desc else None)
 		if bad_tx_desc:
+			time.sleep(0.5)
 			t.expect('Only sent transactions')
 			t.expect(bad_tx_desc)
 		else:

+ 2 - 2
test/cmdtest_py_d/ct_ethdev.py

@@ -984,6 +984,8 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
 		return self.token_compile(token_data)
 
 	async def get_tx_receipt(self,txid):
+		if self.daemon.id == 'geth': # yet another Geth bug
+			await asyncio.sleep(0.5)
 		from mmgen.tx import NewTX
 		tx = await NewTX(cfg=cfg,proto=self.proto)
 		tx.rpc = await self.rpc
@@ -1079,8 +1081,6 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
 					dfl_devkey,
 					start_gas = self.proto.coin_amt(60000,'wei'),
 					gasPrice  = self.proto.coin_amt(8,'Gwei') )
-				if self.daemon.id == 'geth': # yet another Geth bug
-					await asyncio.sleep(0.5)
 				if (await self.get_tx_receipt(txid)).status == 0:
 					die(2,'Transfer of token funds failed. Aborting')
 

+ 1 - 1
test/cmdtest_py_d/ct_regtest.py

@@ -2019,7 +2019,7 @@ class CmdTestRegtest(CmdTestBase,CmdTestShared):
 			'bob',
 			'L',
 			'More than one change address requested',
-			add_args = ['B'])
+			add_args = ['B' if self.proto.cap('segwit') else 'C'])
 
 	def carol_twimport2(self):
 		u,b = (4,3) if self.proto.cap('segwit') else (3,2)

+ 1 - 1
test/test-release.sh

@@ -195,7 +195,7 @@ do_reexec() {
 		eval "python3 -m build --no-isolation --sdist --config-setting=quiet $STDOUT_DEVNULL"
 		echo -e "done\n${BLUE}Unpacking sdist archive to $YELLOW$target_dir$RESET"
 		tar -C $target_dir -axf dist/*.tar.gz
-		cd $(echo $target_dir/$repo-*)
+		cd $target_dir/${repo//-/[-_]}-*
 		echo -e "${BLUE}cd -> $YELLOW$PWD$RESET"
 		if [ "$clone_dir" ]; then rm -rf $clone_dir; fi
 	fi