Browse Source

test suite: ARM fixes

The MMGen Project 3 years ago
parent
commit
0098f5a71f

+ 5 - 1
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'
 

+ 5 - 1
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):

+ 4 - 0
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

+ 1 - 0
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)

+ 1 - 0
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')