From 0098f5a71fa4a4126615ff4d6b57be61008323c6 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Wed, 13 Oct 2021 20:44:44 +0000 Subject: [PATCH] test suite: ARM fixes --- test/test-release.sh | 6 +++++- test/unit_tests.py | 6 +++++- test/unit_tests_d/ut_daemon.py | 4 ++++ test/unit_tests_d/ut_rpc.py | 1 + test/unit_tests_d/ut_testdep.py | 1 + 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/test/test-release.sh b/test/test-release.sh index 96411ffa..73bd13df 100755 --- a/test/test-release.sh +++ b/test/test-release.sh @@ -6,6 +6,8 @@ SUDO='sudo' if [ "$(uname -m)" == 'armv7l' ]; then ARM32=1 +elif [ "$(uname -m)" == 'aarch64' ]; then + ARM64=1 elif uname -a | grep -q 'MSYS'; then SUDO='' MSYS2=1; fi @@ -329,6 +331,7 @@ t_alts=" " [ "$MSYS2" ] && t_alts_skip='m z' # no moneropy (pysha3), zcash-mini (golang) +[ "$ARM32" -o "$ARM64" ] && t_alts_skip='z e' f_alts='Gen-only altcoin tests completed' @@ -361,6 +364,7 @@ t_eth=" f_eth='Ethereum tests completed' [ "$FAST" ] && t_eth_skip='oe' +[ "$ARM32" -o "$ARM64" ] && t_eth_skip='oe parity' i_autosign='Autosign' s_autosign='The bitcoin, bitcoin-bchn and litecoin mainnet and testnet daemons must be running for the following test' @@ -486,7 +490,7 @@ t_tool=" - $tooltest_py --coin=zec cryptocoin z $tooltest_py --coin=zec --type=zcash_z cryptocoin " -[ "$MSYS2" ] && t_tool_skip='z' +[ "$MSYS2" -o "$ARM32" -o "$ARM64" ] && t_tool_skip='z' f_tool='tooltest tests completed' diff --git a/test/unit_tests.py b/test/unit_tests.py index d2ee517f..4ceeba6f 100755 --- a/test/unit_tests.py +++ b/test/unit_tests.py @@ -20,7 +20,7 @@ test/unit_tests.py: Unit tests for the MMGen suite """ -import sys,os,time,importlib +import sys,os,time,importlib,platform from include.tests_header import repo_root from include.common import end_msg @@ -115,6 +115,7 @@ def run_test(test,subtest=None): t = getattr(mod,'unit_tests') altcoin_deps = getattr(t,'altcoin_deps',()) win_skip = getattr(t,'win_skip',()) + arm_skip = getattr(t,'arm_skip',()) subtests = [k for k,v in t.__dict__.items() if type(v).__name__ == 'function'] for subtest in subtests: if opt.no_altcoin_deps and subtest in altcoin_deps: @@ -123,6 +124,9 @@ def run_test(test,subtest=None): if g.platform == 'win' and subtest in win_skip: qmsg(gray(f'Skipping {subtest!r} for Windows platform')) continue + elif platform.machine() == 'aarch64' and subtest in arm_skip: + qmsg(gray(f'Skipping {subtest!r} for ARM platform')) + continue run_subtest(subtest) else: if not mod.unit_test().run_test(test,UnitTestHelpers): diff --git a/test/unit_tests_d/ut_daemon.py b/test/unit_tests_d/ut_daemon.py index ea8b1385..df1a53a3 100755 --- a/test/unit_tests_d/ut_daemon.py +++ b/test/unit_tests_d/ut_daemon.py @@ -52,12 +52,16 @@ def test_flags_err(ut,d): ('flag (4)', 'ClassFlagsError', 'already set', bad7 ), )) +arm_skip_daemons = ('openethereum','parity') + def test_cmds(op): network_ids = CoinDaemon.get_network_ids() for test_suite in [True,False] if op == 'print' else [True]: vmsg(orange(f'Start commands (op={op}, test_suite={test_suite}):')) for coin,data in CoinDaemon.coins.items(): for daemon_id in data.daemon_ids: + if daemon_id in arm_skip_daemons: + continue for network in globals()[daemon_id+'_daemon'].networks: if opt.no_altcoin_deps and coin != 'BTC': continue diff --git a/test/unit_tests_d/ut_rpc.py b/test/unit_tests_d/ut_rpc.py index 26f012c4..c7b6122e 100755 --- a/test/unit_tests_d/ut_rpc.py +++ b/test/unit_tests_d/ut_rpc.py @@ -91,6 +91,7 @@ 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 def btc(self,name,ut): return run_test(['btc','btc_tn'],test_cf_auth=True) diff --git a/test/unit_tests_d/ut_testdep.py b/test/unit_tests_d/ut_testdep.py index b2d869e1..0082ffc3 100755 --- a/test/unit_tests_d/ut_testdep.py +++ b/test/unit_tests_d/ut_testdep.py @@ -11,6 +11,7 @@ class unit_tests: altcoin_deps = ('pycoin','moneropy','keyconv','zcash_mini','ethkey') win_skip = ('losetup','moneropy','zcash_mini') + arm_skip = ('zcash_mini','ethkey') def core_repo(self,name,ut): crr = os.getenv('CORE_REPO_ROOT')