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 10:31:58 +0000 |
| commit | f05dc3f817ac383ff1fbbddc902d0b8d3c291eb3 (patch) | |
| tree | b620654cf3c7b3058696b84762fe3b3f197f400b /meta/lib | |
| parent | cf8425e247b707d0500f665842113254cfcc2a70 (diff) | |
| download | poky-f05dc3f817ac383ff1fbbddc902d0b8d3c291eb3.tar.gz | |
oeqa/runtime: add gobject-introspection test
(From OE-Core rev: 497a95b576e19e39e20ac280d0db24f51b7c9679)
(From OE-Core rev: 7fe336e34bbdc16a28f95ce6ec043943f8033002)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
| -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 @@ | |||
| 1 | import os | ||
| 2 | |||
| 3 | from oeqa.runtime.case import OERuntimeTestCase | ||
| 4 | from oeqa.core.decorator.depends import OETestDepends | ||
| 5 | from oeqa.runtime.decorator.package import OEHasPackage | ||
| 6 | |||
| 7 | class GObjectIntrospectionTest(OERuntimeTestCase): | ||
| 8 | |||
| 9 | @OETestDepends(["ssh.SSHTest.test_ssh"]) | ||
| 10 | @OEHasPackage(["python3-pygobject"]) | ||
| 11 | def test_python(self): | ||
| 12 | script = """from gi.repository import GObject; print(GObject.markup_escape_text("<testing&testing>"))""" | ||
| 13 | status, output = self.target.run("python3 -c '%s'" % script) | ||
| 14 | self.assertEqual(status, 0, msg="Python failed (%s)" % (output)) | ||
| 15 | self.assertEqual(output, "<testing&testing>", msg="Unexpected output (%s)" % output) | ||
