From 15b94c53edc86031c74b27cd3d824d2291c0c91f Mon Sep 17 00:00:00 2001 From: Michael Auchter Date: Wed, 29 Jan 2020 14:02:59 -0600 Subject: mpm: sys_utils: add libgpiod-based Gpio helper This adds a new Gpio helper class, which uses libgpiod under the hood instead of the deprecated sysfs GPIO access. This class provides the ability to get/set a specific GPIO, which is looked up by name. --- mpm/python/tests/base_tests.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'mpm/python/tests/base_tests.py') diff --git a/mpm/python/tests/base_tests.py b/mpm/python/tests/base_tests.py index ec4b8328a..cb57b3481 100755 --- a/mpm/python/tests/base_tests.py +++ b/mpm/python/tests/base_tests.py @@ -7,7 +7,7 @@ Base Test Case classes """ -import platform +from test_utilities import on_linux, on_usrp import unittest class TestBase(unittest.TestCase): @@ -19,7 +19,7 @@ class TestBase(unittest.TestCase): Test function decorator which skips tests unless the current execution environment is a linux OS. """ - if 'linux' in platform.system().lower(): + if on_linux(): return lambda func: func return unittest.skip("This test is only valid when run on a Linux system.") @@ -27,11 +27,8 @@ class TestBase(unittest.TestCase): """ Test function decorator which skips tests unless the current execution environment is a USRP. - - Assumes that 'arm' in the machine name constitutes an ARM - processor, aka a USRP. """ - if 'arm' in platform.machine().lower(): + if on_usrp(): return lambda func: func return unittest.skip("This test is only valid when run on the USRP.") -- cgit v1.2.3