mirror of
https://git.yoctoproject.org/poky
synced 2026-09-16 09:49:35 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
0d9808349c
commit
a32d16cb29
@@ -1,11 +1,15 @@
|
|||||||
import unittest
|
import unittest
|
||||||
import bb, oe.utils
|
import oe.utils
|
||||||
|
|
||||||
class TestPackagesFilterOutSystem(unittest.TestCase):
|
class TestPackagesFilterOutSystem(unittest.TestCase):
|
||||||
def test_filter(self):
|
def test_filter(self):
|
||||||
"""
|
"""
|
||||||
Test that oe.utils.packages_filter_out_system works.
|
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 = bb.data_smart.DataSmart()
|
||||||
d.setVar("PN", "foo")
|
d.setVar("PN", "foo")
|
||||||
|
|||||||
Reference in New Issue
Block a user