diff options
-rw-r--r-- | meta/lib/oeqa/sdk/cases/buildepoxy.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/buildepoxy.py new file mode 100644 index 0000000000..ef24b4f4ac --- /dev/null +++ b/meta/lib/oeqa/sdk/cases/buildepoxy.py | |||
@@ -0,0 +1,35 @@ | |||
1 | import os | ||
2 | import subprocess | ||
3 | import tempfile | ||
4 | import unittest | ||
5 | |||
6 | from oeqa.sdk.case import OESDKTestCase | ||
7 | from oeqa.utils.subprocesstweak import errors_have_output | ||
8 | errors_have_output() | ||
9 | |||
10 | class EpoxyTest(OESDKTestCase): | ||
11 | """ | ||
12 | Test that Meson builds correctly. | ||
13 | """ | ||
14 | def setUp(self): | ||
15 | if not (self.tc.hasHostPackage("nativesdk-meson")): | ||
16 | raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain Meson") | ||
17 | |||
18 | def test_epoxy(self): | ||
19 | with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir: | ||
20 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/anholt/libepoxy/releases/download/1.5.3/libepoxy-1.5.3.tar.xz") | ||
21 | |||
22 | dirs = {} | ||
23 | dirs["source"] = os.path.join(testdir, "libepoxy-1.5.3") | ||
24 | dirs["build"] = os.path.join(testdir, "build") | ||
25 | dirs["install"] = os.path.join(testdir, "install") | ||
26 | |||
27 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir]) | ||
28 | self.assertTrue(os.path.isdir(dirs["source"])) | ||
29 | os.makedirs(dirs["build"]) | ||
30 | |||
31 | self._run("meson -Degl=no -Dglx=no -Dx11=false {build} {source}".format(**dirs)) | ||
32 | self._run("ninja -C {build} -v".format(**dirs)) | ||
33 | self._run("DESTDIR={install} ninja -C {build} -v install".format(**dirs)) | ||
34 | |||
35 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libepoxy.so")) | ||