diff options
author | Lars Amsel <lars.amsel@ni.com> | 2021-06-04 08:27:50 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-10 12:01:53 -0500 |
commit | 2a575bf9b5a4942f60e979161764b9e942699e1e (patch) | |
tree | 2f0535625c30025559ebd7494a4b9e7122550a73 /mpm/tools/check-filesystem | |
parent | e17916220cc955fa219ae37f607626ba88c4afe3 (diff) | |
download | uhd-2a575bf9b5a4942f60e979161764b9e942699e1e.tar.gz uhd-2a575bf9b5a4942f60e979161764b9e942699e1e.tar.bz2 uhd-2a575bf9b5a4942f60e979161764b9e942699e1e.zip |
uhd: Add support for the USRP X410
Co-authored-by: Lars Amsel <lars.amsel@ni.com>
Co-authored-by: Michael Auchter <michael.auchter@ni.com>
Co-authored-by: Martin Braun <martin.braun@ettus.com>
Co-authored-by: Paul Butler <paul.butler@ni.com>
Co-authored-by: Cristina Fuentes <cristina.fuentes-curiel@ni.com>
Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com>
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Co-authored-by: Lane Kolbly <lane.kolbly@ni.com>
Co-authored-by: Max Köhler <max.koehler@ni.com>
Co-authored-by: Andrew Lynch <andrew.lynch@ni.com>
Co-authored-by: Grant Meyerhoff <grant.meyerhoff@ni.com>
Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
Co-authored-by: Thomas Vogel <thomas.vogel@ni.com>
Diffstat (limited to 'mpm/tools/check-filesystem')
-rwxr-xr-x | mpm/tools/check-filesystem | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/mpm/tools/check-filesystem b/mpm/tools/check-filesystem index 1ceb7b993..37a69b858 100755 --- a/mpm/tools/check-filesystem +++ b/mpm/tools/check-filesystem @@ -9,6 +9,8 @@ import sys import traceback import unittest +from usrp_mpm.mpmlog import get_main_logger +from usrp_mpm.periph_manager.x4xx_periphs import MboardRegsControl from usrp_mpm.sys_utils.filesystem_status import * from usrp_mpm.sys_utils.dtoverlay import list_overlays from usrp_mpm.sys_utils.dtoverlay import list_available_overlays @@ -40,13 +42,16 @@ class SimpleResult(unittest.TextTestResult): % (flavour, self.getDescription(test), err)) class CheckFilesystem(unittest.TestCase): + mboard_regs_control = None + def _assert_filesystem_root_is_not_set(self): if self.args.filesystem_root != '/': raise ValueError("Changing the filesystem root is not possible for this test") def __init__(self, methodName='runTest', args=None): super(CheckFilesystem, self).__init__(methodName) - self.args=args + self.args = args + self.log = get_main_logger() def test_uhd_version(self): uhd_version = get_uhd_version(filesystem_root=self.args.filesystem_root) @@ -56,6 +61,25 @@ class CheckFilesystem(unittest.TestCase): uhd_version = get_uhd_version(filesystem_root=self.args.filesystem_root) self.assertIn(self.args.uhd_githash, uhd_version) + def test_fpga_type(self): + if self.mboard_regs_control is None: + self.mboard_regs_control = MboardRegsControl("mboard-regs", self.log) + fpga_type = self.mboard_regs_control.get_fpga_type() + self.assertEqual(fpga_type, self.args.fpga_type) + + def test_fpga_version(self): + if self.mboard_regs_control is None: + self.mboard_regs_control = MboardRegsControl("mboard-regs", self.log) + compat_number = self.mboard_regs_control.get_compat_number() + fpga_version = "{}.{}".format(*compat_number) + self.assertEqual(fpga_version, self.args.fpga_version) + + def test_fpga_githash(self): + if self.mboard_regs_control is None: + self.mboard_regs_control = MboardRegsControl("mboard-regs", self.log) + fpga_githash = "{:x}.{}".format(*self.mboard_regs_control.get_git_hash()) + self.assertEqual(fpga_githash, self.args.fpga_githash) + def test_mender_artifact(self): mender_artifact = get_mender_artifact(filesystem_root=self.args.filesystem_root) self.assertEqual(mender_artifact, self.args.mender_artifact) @@ -119,6 +143,9 @@ def args_parser(argv): parser = argparse.ArgumentParser() parser.add_argument("--uhd-version", help="Check UHD version") parser.add_argument("--uhd-githash", help="Check UHD githash") + parser.add_argument("--fpga-type", help="Check FPGA type") + parser.add_argument("--fpga-version", help="Check FPGA version") + parser.add_argument("--fpga-githash", help="Check FPGA githash") parser.add_argument("--mender-artifact", help="Check mender artifact") parser.add_argument("--fs-version", help="Check filesystem version string") parser.add_argument("--opkg-status-date", help="Check package management status file date") |