diff options
Diffstat (limited to 'meta/lib/oeqa/sdk/cases/gtk3.py')
-rw-r--r-- | meta/lib/oeqa/sdk/cases/gtk3.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdk/cases/gtk3.py b/meta/lib/oeqa/sdk/cases/gtk3.py new file mode 100644 index 0000000000..cdaf50ed38 --- /dev/null +++ b/meta/lib/oeqa/sdk/cases/gtk3.py | |||
@@ -0,0 +1,40 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | import os | ||
8 | import subprocess | ||
9 | import tempfile | ||
10 | |||
11 | from oeqa.sdk.cases.meson import MesonTestBase | ||
12 | |||
13 | from oeqa.utils.subprocesstweak import errors_have_output | ||
14 | errors_have_output() | ||
15 | |||
16 | class GTK3Test(MesonTestBase): | ||
17 | |||
18 | def setUp(self): | ||
19 | super().setUp() | ||
20 | self.ensure_target_package("gtk+3", "libgtk-3.0", recipe="gtk+3") | ||
21 | self.ensure_host_package("glib-2.0-utils", "libglib-2.0-utils", recipe="glib-2.0") | ||
22 | |||
23 | """ | ||
24 | Test that autotools and GTK+ 3 compiles correctly. | ||
25 | """ | ||
26 | def test_libhandy(self): | ||
27 | with tempfile.TemporaryDirectory(prefix="libhandy", dir=self.tc.sdk_dir) as testdir: | ||
28 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://download.gnome.org/sources/libhandy/1.8/libhandy-1.8.3.tar.xz") | ||
29 | |||
30 | sourcedir = os.path.join(testdir, "libhandy-1.8.3") | ||
31 | builddir = os.path.join(testdir, "build") | ||
32 | installdir = os.path.join(testdir, "install") | ||
33 | |||
34 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) | ||
35 | self.assertTrue(os.path.isdir(sourcedir)) | ||
36 | os.makedirs(builddir) | ||
37 | |||
38 | self.build_meson(sourcedir, builddir, installdir, "-Dglade_catalog=disabled -Dintrospection=disabled -Dvapi=false") | ||
39 | self.assertTrue(os.path.isdir(installdir)) | ||
40 | self.check_elf(os.path.join(installdir, "usr", "local", "lib", "libhandy-1.so")) | ||