diff options
Diffstat (limited to 'meta/lib/oeqa/sdk/cases/buildgalculator.py')
-rw-r--r-- | meta/lib/oeqa/sdk/cases/buildgalculator.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/buildgalculator.py deleted file mode 100644 index 178f07472d..0000000000 --- a/meta/lib/oeqa/sdk/cases/buildgalculator.py +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | import os | ||
8 | import subprocess | ||
9 | import tempfile | ||
10 | import unittest | ||
11 | |||
12 | from oeqa.sdk.case import OESDKTestCase | ||
13 | from oeqa.utils.subprocesstweak import errors_have_output | ||
14 | errors_have_output() | ||
15 | |||
16 | class GalculatorTest(OESDKTestCase): | ||
17 | """ | ||
18 | Test that autotools and GTK+ 3 compiles correctly. | ||
19 | """ | ||
20 | def setUp(self): | ||
21 | if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or \ | ||
22 | self.tc.hasTargetPackage("libgtk-3.0", multilib=True)): | ||
23 | raise unittest.SkipTest("GalculatorTest class: SDK don't support gtk+3") | ||
24 | if not (self.tc.hasHostPackage("nativesdk-gettext-dev") or | ||
25 | self.tc.hasHostPackage("gettext-native")): | ||
26 | raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain gettext") | ||
27 | |||
28 | def test_galculator(self): | ||
29 | with tempfile.TemporaryDirectory(prefix="galculator", dir=self.tc.sdk_dir) as testdir: | ||
30 | tarball = self.fetch(testdir, self.td["DL_DIR"], "http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2") | ||
31 | |||
32 | dirs = {} | ||
33 | dirs["source"] = os.path.join(testdir, "galculator-2.1.4") | ||
34 | dirs["build"] = os.path.join(testdir, "build") | ||
35 | dirs["install"] = os.path.join(testdir, "install") | ||
36 | |||
37 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) | ||
38 | self.assertTrue(os.path.isdir(dirs["source"])) | ||
39 | os.makedirs(dirs["build"]) | ||
40 | |||
41 | self._run("cd {source} && sed -i -e '/s_preferences.*prefs;/d' src/main.c && autoreconf -i -f -I $OECORE_TARGET_SYSROOT/usr/share/aclocal -I m4".format(**dirs)) | ||
42 | self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs)) | ||
43 | self._run("cd {build} && make -j".format(**dirs)) | ||
44 | self._run("cd {build} && make install DESTDIR={install}".format(**dirs)) | ||
45 | |||
46 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "galculator")) | ||