diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oescripts.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py index 41cbe04808..2f18d8f29c 100644 --- a/meta/lib/oeqa/selftest/cases/oescripts.py +++ b/meta/lib/oeqa/selftest/cases/oescripts.py | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | import os | 5 | import os |
6 | import shutil | 6 | import shutil |
7 | import importlib | ||
7 | import unittest | 8 | import unittest |
8 | from oeqa.selftest.case import OESelftestTestCase | 9 | from oeqa.selftest.case import OESelftestTestCase |
9 | from oeqa.selftest.cases.buildhistory import BuildhistoryBase | 10 | from oeqa.selftest.cases.buildhistory import BuildhistoryBase |
@@ -33,15 +34,13 @@ class BuildhistoryDiffTests(BuildhistoryBase): | |||
33 | if expected_endlines: | 34 | if expected_endlines: |
34 | self.fail('Missing expected line endings:\n %s' % '\n '.join(expected_endlines)) | 35 | self.fail('Missing expected line endings:\n %s' % '\n '.join(expected_endlines)) |
35 | 36 | ||
37 | @unittest.skipUnless(importlib.util.find_spec("cairo"), "Python cairo module is not present") | ||
36 | class OEScriptTests(OESelftestTestCase): | 38 | class OEScriptTests(OESelftestTestCase): |
37 | 39 | ||
38 | @classmethod | 40 | @classmethod |
39 | def setUpClass(cls): | 41 | def setUpClass(cls): |
40 | super(OEScriptTests, cls).setUpClass() | 42 | super(OEScriptTests, cls).setUpClass() |
41 | try: | 43 | import cairo |
42 | import cairo | ||
43 | except ImportError: | ||
44 | raise unittest.SkipTest('Python module cairo is not present') | ||
45 | bitbake("core-image-minimal -c rootfs -f") | 44 | bitbake("core-image-minimal -c rootfs -f") |
46 | cls.tmpdir = get_bb_var('TMPDIR') | 45 | cls.tmpdir = get_bb_var('TMPDIR') |
47 | cls.buildstats = cls.tmpdir + "/buildstats/" + sorted(os.listdir(cls.tmpdir + "/buildstats"))[-1] | 46 | cls.buildstats = cls.tmpdir + "/buildstats/" + sorted(os.listdir(cls.tmpdir + "/buildstats"))[-1] |