From 0fa8bfa1104b18aaed8afb720cf0fa8ad8b3ffa2 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 26 Feb 2014 14:21:40 -0500 Subject: SmartOS: do not run on arm as dmidecode causes problems See LP: #1243287 for more information, but the easiest thing to do here is just not run smartos on arm. LP: #1243287 --- tests/unittests/test_datasource/test_smartos.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/unittests') diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index 11d9a264..8f9fa27d 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -158,6 +158,11 @@ class TestSmartOSDataSource(helpers.FilesystemMockingTestCase): def _dmi_data(): return dmi_data + def _os_uname(): + # LP: #1243287. tests assume this runs, but running test on + # arm would cause them all to fail. + return ('LINUX', 'NODENAME', 'RELEASE', 'VERSION', 'x86_64') + if sys_cfg is None: sys_cfg = {} @@ -168,6 +173,7 @@ class TestSmartOSDataSource(helpers.FilesystemMockingTestCase): self.apply_patches([(mod, 'LEGACY_USER_D', self.legacy_user_d)]) self.apply_patches([(mod, 'get_serial', _get_serial)]) self.apply_patches([(mod, 'dmi_data', _dmi_data)]) + self.apply_patches([(os, 'uname', _os_uname)]) dsrc = mod.DataSourceSmartOS(sys_cfg, distro=None, paths=self.paths) return dsrc -- cgit v1.2.3