diff options
author | Ross Burton <ross.burton@intel.com> | 2013-05-23 12:34:04 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-07 16:41:01 +0100 |
commit | c4a5bd810ca92d57c334113c528bd1d233b3eac4 (patch) | |
tree | 1f1861e7c4ea31bbef036722446a889ca113468b /meta/lib/oe | |
parent | 6ff15b794d3027d315712e6a5abae1bed0159d1a (diff) | |
download | openembedded-core-c4a5bd810ca92d57c334113c528bd1d233b3eac4.tar.gz openembedded-core-c4a5bd810ca92d57c334113c528bd1d233b3eac4.tar.bz2 openembedded-core-c4a5bd810ca92d57c334113c528bd1d233b3eac4.zip |
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@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | 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 78b1361161..5e1ea0e6ea 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") |