Browse Source

testing distro/platform compatibility fixes for ethkey,openethereum

The MMGen Project 2 years ago
parent
commit
63c573e0d6
4 changed files with 16 additions and 2 deletions
  1. 1 1
      mmgen/data/version
  2. 3 1
      test/test-release.d/cfg.sh
  3. 7 0
      test/test-release.sh
  4. 5 0
      test/unit_tests_d/ut_testdep.py

+ 1 - 1
mmgen/data/version

@@ -1 +1 @@
-13.2.dev14
+13.2.dev15

+ 3 - 1
test/test-release.d/cfg.sh

@@ -162,6 +162,7 @@ init_tests() {
 
 	[ "$MSYS2" ] && t_alts_skip='m z'  # no moneropy (pysha3), zcash-mini (golang)
 	[ "$ARM32" ] && t_alts_skip='z e'
+	[ "$DISTRO" == 'arch' -o "$DISTRO" == 'archarm' ] || t_alts_skip+=' e' # ethkey available only on Arch Linux
 
 	f_alts='Gen-only altcoin tests completed'
 
@@ -182,7 +183,8 @@ init_tests() {
 	f_eth='Ethereum tests completed'
 
 	[ "$FAST" ] && t_eth_skip='oe'
-	[ "$ARM32" -o "$ARM64" ] && t_eth_skip='oe parity'
+	[ "$ARM32" -o "$ARM64" ] && t_eth_skip+=' parity'
+	[ \( "$ARM32" -o "$ARM64" \) -a "$DISTRO" != 'archarm' ] && t_eth_skip+=' oe' # ARM oe available only on ArchLinuxArm
 
 	i_autosign='Autosign'
 	s_autosign='The bitcoin, bitcoin-bchn and litecoin mainnet and testnet daemons must be running for the following test'

+ 7 - 0
test/test-release.sh

@@ -104,6 +104,13 @@ elif uname -a | grep -q 'MSYS'; then
 	MSYS2=1;
 fi
 
+if [ "$MSYS2" ]; then
+	DISTRO='MSYS2'
+else
+	DISTRO=$(grep '^ID=' '/etc/os-release' | cut -c 4-)
+	[ "$DISTRO" ] || { echo 'Unable to determine distro.  Aborting'; exit 1; }
+fi
+
 trap 'echo -e "${GREEN}Exiting at user request$RESET"; exit' INT
 
 umask 0022

+ 5 - 0
test/unit_tests_d/ut_testdep.py

@@ -47,6 +47,11 @@ class unit_tests:
 		return True
 
 	def ethkey(self,name,ut):
+		if g.platform == 'linux':
+			distro = [l for l in open('/etc/os-release').read().split('\n') if l.startswith('ID=')][0][3:]
+			if distro not in ('arch','archarm'):
+				ymsg(f'Skipping ethkey availability test for distro {distro!r}')
+				return True
 		from test.include.common import get_ethkey
 		get_ethkey()
 		return True