new machine global constant
This commit is contained in:
parent
ab41b78863
commit
e982f7003a
3 changed files with 7 additions and 6 deletions
|
|
@ -20,7 +20,7 @@
|
|||
cfg: Configuration classes for the MMGen suite
|
||||
"""
|
||||
|
||||
import sys, os
|
||||
import sys, os, platform
|
||||
from collections import namedtuple
|
||||
from .base_obj import Lockable
|
||||
|
||||
|
|
@ -92,6 +92,7 @@ class GlobalConstants(Lockable):
|
|||
prog_id = prog_name.removeprefix(f'{proj_id}-')
|
||||
cmd_caps = cmd_caps_data.get(prog_id)
|
||||
|
||||
machine = platform.machine() # x86_64, aarch64, armv7l, riscv64, AMD64 (MSYS2)
|
||||
platform = sys.platform # linux, darwin, win32 (MSYS2)
|
||||
|
||||
if platform not in ('linux', 'win32', 'darwin'):
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ test.daemontest_d.exec: unit test for the MMGen suite's Daemon class
|
|||
from subprocess import run, PIPE
|
||||
from collections import namedtuple
|
||||
|
||||
from mmgen.cfg import gc
|
||||
from mmgen.color import orange, red
|
||||
from mmgen.util import fmt_list, in_nix_environment
|
||||
from mmgen.daemon import CoinDaemon
|
||||
|
|
@ -107,11 +108,10 @@ class unit_tests:
|
|||
|
||||
def avail(self, name, ut):
|
||||
qmsg_r('Testing availability of coin daemons...')
|
||||
from platform import machine
|
||||
test_reth = not (cfg.no_altcoin_deps or cfg.fast)
|
||||
test_parity = not (
|
||||
cfg.no_altcoin_deps
|
||||
or machine() in ('riscv64', 'aarch64', 'armv7l')
|
||||
or gc.machine in ('riscv64', 'aarch64', 'armv7l')
|
||||
or in_nix_environment())
|
||||
ret1 = self._test_cmd(
|
||||
['start', '--print-version', '--mainnet-only'],
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
test.include.unit_test: Unit test framework for the MMGen suite
|
||||
"""
|
||||
|
||||
import sys, os, time, importlib, platform, asyncio
|
||||
import sys, os, time, importlib, asyncio
|
||||
|
||||
from .test_init import repo_root
|
||||
|
||||
|
|
@ -249,10 +249,10 @@ def run_test(test, subtest=None):
|
|||
if gc.platform == 'darwin' and _subtest in mac_skip:
|
||||
subtest_skip_msg(_subtest, 'for macOS platform')
|
||||
continue
|
||||
if platform.machine() == 'aarch64' and _subtest in arm_skip:
|
||||
if gc.machine == 'aarch64' and _subtest in arm_skip:
|
||||
subtest_skip_msg(_subtest, 'for ARM platform')
|
||||
continue
|
||||
if platform.machine() == 'riscv64' and _subtest in riscv_skip:
|
||||
if gc.machine == 'riscv64' and _subtest in riscv_skip:
|
||||
subtest_skip_msg(_subtest, 'for RISC-V platform')
|
||||
continue
|
||||
run_subtest(t, _subtest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue