From 63c573e0d62850badde26cf8aa669ded99480671 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 16 Aug 2022 20:35:50 +0000 Subject: [PATCH] testing distro/platform compatibility fixes for ethkey,openethereum --- mmgen/data/version | 2 +- test/test-release.d/cfg.sh | 4 +++- test/test-release.sh | 7 +++++++ test/unit_tests_d/ut_testdep.py | 5 +++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mmgen/data/version b/mmgen/data/version index 0afaf87e..753ad1c5 100644 --- a/mmgen/data/version +++ b/mmgen/data/version @@ -1 +1 @@ -13.2.dev14 +13.2.dev15 diff --git a/test/test-release.d/cfg.sh b/test/test-release.d/cfg.sh index 2556c846..b1bb946e 100755 --- a/test/test-release.d/cfg.sh +++ b/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' diff --git a/test/test-release.sh b/test/test-release.sh index 488f2a89..1eca351a 100755 --- a/test/test-release.sh +++ b/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 diff --git a/test/unit_tests_d/ut_testdep.py b/test/unit_tests_d/ut_testdep.py index c8b1cf43..e8170c6a 100755 --- a/test/unit_tests_d/ut_testdep.py +++ b/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