diff options
author | Michael Auchter <michael.auchter@ni.com> | 2020-01-29 14:02:59 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-03 09:34:55 -0500 |
commit | 15b94c53edc86031c74b27cd3d824d2291c0c91f (patch) | |
tree | 1e57c3e87262b8d156336d8c28b6f90e86eda1d5 /mpm/python/tests/base_tests.py | |
parent | 60a147a6a16ced611ab1a7dfdb233d3bd01a0d65 (diff) | |
download | uhd-15b94c53edc86031c74b27cd3d824d2291c0c91f.tar.gz uhd-15b94c53edc86031c74b27cd3d824d2291c0c91f.tar.bz2 uhd-15b94c53edc86031c74b27cd3d824d2291c0c91f.zip |
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.
Diffstat (limited to 'mpm/python/tests/base_tests.py')
-rwxr-xr-x | mpm/python/tests/base_tests.py | 9 |
1 files changed, 3 insertions, 6 deletions
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.") |