summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/tests
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-05-23 12:34:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-07 16:48:24 +0100
commita32d16cb2971e3096ecb2333e672ad198c3cfe46 (patch)
tree48ce3887ffa69dcc28ba68db7bf29f38f368f9af /meta/lib/oe/tests
parent0d9808349c109d2067da7b53f1cb6a4f1fc25b21 (diff)
downloadpoky-a32d16cb2971e3096ecb2333e672ad198c3cfe46.tar.gz
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. (From OE-Core rev: c4a5bd810ca92d57c334113c528bd1d233b3eac4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/tests')
-rw-r--r--meta/lib/oe/tests/test_utils.py6
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 @@
1import unittest 1import unittest
2import bb, oe.utils 2import oe.utils
3 3
4class TestPackagesFilterOutSystem(unittest.TestCase): 4class TestPackagesFilterOutSystem(unittest.TestCase):
5 def test_filter(self): 5 def test_filter(self):
6 """ 6 """
7 Test that oe.utils.packages_filter_out_system works. 7 Test that oe.utils.packages_filter_out_system works.
8 """ 8 """
9 try:
10 import bb
11 except ImportError:
12 self.skipTest("Cannot import bb")
9 13
10 d = bb.data_smart.DataSmart() 14 d = bb.data_smart.DataSmart()
11 d.setVar("PN", "foo") 15 d.setVar("PN", "foo")