diff options
author | Ross Burton <ross.burton@intel.com> | 2018-01-16 15:01:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-29 08:49:52 +0000 |
commit | 7fe336e34bbdc16a28f95ce6ec043943f8033002 (patch) | |
tree | 30a8f00a264c4c7b7deacf67e73c47a4a40a563c /meta/lib/oeqa/runtime | |
parent | ac373c9f760463d989d6a1eb3a14b7c5b255b9d4 (diff) | |
download | openembedded-core-7fe336e34bbdc16a28f95ce6ec043943f8033002.tar.gz openembedded-core-7fe336e34bbdc16a28f95ce6ec043943f8033002.tar.bz2 openembedded-core-7fe336e34bbdc16a28f95ce6ec043943f8033002.zip |
oeqa/runtime: add gobject-introspection test
(From OE-Core rev: 497a95b576e19e39e20ac280d0db24f51b7c9679)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/gi.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/gi.py b/meta/lib/oeqa/runtime/cases/gi.py new file mode 100644 index 0000000000..19073e52cb --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/gi.py @@ -0,0 +1,15 @@ +import os + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.decorator.package import OEHasPackage + +class GObjectIntrospectionTest(OERuntimeTestCase): + + @OETestDepends(["ssh.SSHTest.test_ssh"]) + @OEHasPackage(["python3-pygobject"]) + def test_python(self): + script = """from gi.repository import GObject; print(GObject.markup_escape_text("<testing&testing>"))""" + status, output = self.target.run("python3 -c '%s'" % script) + self.assertEqual(status, 0, msg="Python failed (%s)" % (output)) + self.assertEqual(output, "<testing&testing>", msg="Unexpected output (%s)" % output) |