[oe-commits] Ross Burton : test-utils: handle import bb failing and skip the test
git at git.openembedded.org
git at git.openembedded.org
Fri Jun 7 15:43:54 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: c4a5bd810ca92d57c334113c528bd1d233b3eac4
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c4a5bd810ca92d57c334113c528bd1d233b3eac4
Author: Ross Burton <ross.burton at intel.com>
Date: Thu May 23 12:34:04 2013 +0100
test-utils: handle import bb failing and skip the test
Instead of reporting an error when bb cannot be imported, skip the test
instead. This makes it a lot easier to iterate a test suite when we don't care
about this particular test.
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/lib/oe/tests/test_utils.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/meta/lib/oe/tests/test_utils.py b/meta/lib/oe/tests/test_utils.py
index 78b1361..5e1ea0e 100644
--- a/meta/lib/oe/tests/test_utils.py
+++ b/meta/lib/oe/tests/test_utils.py
@@ -1,11 +1,15 @@
import unittest
-import bb, oe.utils
+import oe.utils
class TestPackagesFilterOutSystem(unittest.TestCase):
def test_filter(self):
"""
Test that oe.utils.packages_filter_out_system works.
"""
+ try:
+ import bb
+ except ImportError:
+ self.skipTest("Cannot import bb")
d = bb.data_smart.DataSmart()
d.setVar("PN", "foo")
More information about the Openembedded-commits
mailing list