Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] oescripts.py: avoid error when cairo module is not available
@ 2019-06-14  6:32 Chen Qi
  2019-06-14  6:32 ` [PATCH 1/1] " Chen Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2019-06-14  6:32 UTC (permalink / raw)
  To: openembedded-core

*** BLURB HERE ***
The following changes since commit e00d88475d0ed7b161f5f58dd13bc9a72e3efdf9:

  bluez: fix test case failures with GCC 9 (2019-06-12 21:08:52 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/oescripts-cairo
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/oescripts-cairo

Chen Qi (1):
  oescripts.py: avoid error when cairo module is not available

 meta/lib/oeqa/selftest/cases/oescripts.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] oescripts.py: avoid error when cairo module is not available
  2019-06-14  6:32 [PATCH 0/1] oescripts.py: avoid error when cairo module is not available Chen Qi
@ 2019-06-14  6:32 ` Chen Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2019-06-14  6:32 UTC (permalink / raw)
  To: openembedded-core

When running 'oe-selftest -r oescripts', the following error appeared.

    cls.skipTest('Python module cairo is not present')
    TypeError: skipTest() missing 1 required positional argument: 'reason'

This is because the host does not have the cairo python module installed.
Fix this problem by using unittest's SkipTest exception.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/lib/oeqa/selftest/cases/oescripts.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index 217afe3..7770b66 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -3,6 +3,7 @@
 #
 
 import os
+import unittest
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.selftest.cases.buildhistory import BuildhistoryBase
 from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
@@ -38,7 +39,7 @@ class OEScriptTests(OESelftestTestCase):
         try:
             import cairo
         except ImportError:
-            cls.skipTest('Python module cairo is not present')
+            raise unittest.SkipTest('Python module cairo is not present')
         bitbake("core-image-minimal -c rootfs -f")
         cls.tmpdir = get_bb_var('TMPDIR')
         cls.buildstats = cls.tmpdir + "/buildstats/" + sorted(os.listdir(cls.tmpdir + "/buildstats"))[-1]
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-14  6:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14  6:32 [PATCH 0/1] oescripts.py: avoid error when cairo module is not available Chen Qi
2019-06-14  6:32 ` [PATCH 1/1] " Chen Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox