From 82fb37d09ccbd8abed73bf408bdde07ae2aaa008 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 21 May 2023 11:34:16 +0000 Subject: [PATCH] minor test fixes, minor Windows install fix --- README.md | 3 +-- setup.py | 11 ++++++----- test/test-release.sh | 2 +- test/test_py_d/ts_shared.py | 4 ++-- test/test_py_d/ts_xmrwallet.py | 3 ++- test/unit_tests_d/ut_rpc.py | 8 ++------ 6 files changed, 14 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 9e42ca88..a8a40960 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,7 @@ widespread standard. - **[Full transaction and address tracking support][T]** for Bitcoin, [Bcash][bx], [Litecoin][bx], [Ethereum][E], Ethereum Classic and [ERC20 tokens][E]. - **Monero transacting and wallet management** via the interactive - [`mmgen-xmrwallet`][xm] command. Offline transaction signing is possible - using a blockchain shared between online and offline machines. + [`mmgen-xmrwallet`][xm] command. - **[Address generation support][ag]** for the above coins, plus [Zcash][zx] (t and z addresses) and [144 Bitcoin-derived altcoins][ax]. - **Support for all Bitcoin address types** including Segwit-P2SH and Bech32. diff --git a/setup.py b/setup.py index 82aa5906..ddfb78e9 100755 --- a/setup.py +++ b/setup.py @@ -12,12 +12,13 @@ def build_libsecp256k1(): def fix_broken_libpython_fn(): from pathlib import Path - from_path = Path('C:/msys64/mingw64/lib/libpython3.10.dll.a') - to_path = Path('C:/msys64/mingw64/lib/libpython310.dll.a') - if from_path.exists() and not to_path.exists(): + path = Path(Path().resolve().anchor) / 'msys64/mingw64/lib' + old = path / 'libpython3.10.dll.a' + new = path / 'libpython310.dll.a' + if old.exists() and not new.exists(): import shutil - print(f'Fixing broken library filename: {from_path.name!r} -> {to_path.name!r}') - shutil.copy2(from_path,to_path) + print(f'Fixing broken library filename: {old.name!r} -> {new.name!r}') + shutil.copy2(old,new) import platform if platform.system() == 'Windows': diff --git a/test/test-release.sh b/test/test-release.sh index 405fe12f..a4c790da 100755 --- a/test/test-release.sh +++ b/test/test-release.sh @@ -116,7 +116,7 @@ if [ "$(uname -m)" == 'armv7l' ]; then ARM32=1 elif [ "$(uname -m)" == 'aarch64' ]; then ARM64=1 -elif uname -a | grep -q 'MSYS'; then +elif [ "$MSYSTEM" ] && uname -a | grep -qi 'msys'; then MSYS2=1; fi diff --git a/test/test_py_d/ts_shared.py b/test/test_py_d/ts_shared.py index 1d6789e9..c02a5a73 100755 --- a/test/test_py_d/ts_shared.py +++ b/test/test_py_d/ts_shared.py @@ -85,10 +85,10 @@ class TestSuiteShared(object): else: if have_est_fee: t.send('n') - if self.proto.coin == 'BCH' or self.proto.base_coin == 'ETH': # TODO: pexpect race condition? - time.sleep(0.1) if eth_fee_res: t.expect('or gas price: ',interactive_fee+'\n') + elif have_est_fee and self.proto.base_coin != 'ETH': + t.expect('fee: ',interactive_fee+'\n') else: t.send(interactive_fee+'\n') if fee_res: diff --git a/test/test_py_d/ts_xmrwallet.py b/test/test_py_d/ts_xmrwallet.py index b08df7af..d5c956f0 100755 --- a/test/test_py_d/ts_xmrwallet.py +++ b/test/test_py_d/ts_xmrwallet.py @@ -155,10 +155,11 @@ class TestSuiteXMRWallet(TestSuiteBase): run(a+b2) omsg(f'SSH SOCKS server started, listening at localhost:{cls.socks_port}') + debug_file = os.path.join('' if external_call else cls.datadir_base,'txrelay-proxy.debug') a = ['ssh','-x','-o','ExitOnForwardFailure=True','-D',f'localhost:{cls.socks_port}'] b0 = ['-o','PasswordAuthentication=False'] b1 = ['localhost','true'] - b2 = ['-fN','-E',os.path.join(cls.datadir_base,'txrelay-proxy.debug'),'localhost'] + b2 = ['-fN','-E', debug_file, 'localhost'] if port_in_use(cls.socks_port): omsg(f'Port {cls.socks_port} already in use. Assuming SSH SOCKS server is running') diff --git a/test/unit_tests_d/ut_rpc.py b/test/unit_tests_d/ut_rpc.py index c504fa66..41070c21 100755 --- a/test/unit_tests_d/ut_rpc.py +++ b/test/unit_tests_d/ut_rpc.py @@ -141,9 +141,8 @@ def run_test(network_ids,test_cf_auth=False,daemon_ids=None): class unit_tests: - altcoin_deps = ('ltc','bch','geth','erigon','openethereum','parity','xmrwallet') - win_skip = ('xmrwallet',) # FIXME - wallet doesn't open - arm_skip = ('openethereum','parity') # no prebuilt binaries for ARM + altcoin_deps = ('ltc','bch','geth','erigon','parity','xmrwallet') + arm_skip = ('parity',) # no prebuilt binaries for ARM def btc(self,name,ut): return run_test(['btc','btc_tn'],test_cf_auth=True) @@ -160,9 +159,6 @@ class unit_tests: def erigon(self,name,ut): return run_test(['eth','eth_tn','eth_rt'],daemon_ids=['erigon']) - def openethereum(self,name,ut): - return run_test(['eth','eth_tn','eth_rt'],daemon_ids=['openethereum']) - def parity(self,name,ut): return run_test(['etc'])