diff options
Diffstat (limited to 'meta/lib/oeqa/sdk')
-rw-r--r-- | meta/lib/oeqa/sdk/case.py | 9 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/cases/autotools.py (renamed from meta/lib/oeqa/sdk/cases/buildcpio.py) | 3 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/cases/cmake.py (renamed from meta/lib/oeqa/sdk/cases/assimp.py) | 12 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/cases/gtk3.py (renamed from meta/lib/oeqa/sdk/cases/buildgalculator.py) | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/cases/makefile.py (renamed from meta/lib/oeqa/sdk/cases/buildlzip.py) | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/cases/maturin.py | 1 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/cases/meson.py (renamed from meta/lib/oeqa/sdk/cases/buildepoxy.py) | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/cases/python.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/cases/rust.py | 1 |
9 files changed, 19 insertions, 19 deletions
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py index c45882689c..46a3789f57 100644 --- a/meta/lib/oeqa/sdk/case.py +++ b/meta/lib/oeqa/sdk/case.py | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | import os | 7 | import os |
8 | import subprocess | 8 | import subprocess |
9 | import shutil | ||
9 | 10 | ||
10 | from oeqa.core.case import OETestCase | 11 | from oeqa.core.case import OETestCase |
11 | 12 | ||
@@ -21,12 +22,14 @@ class OESDKTestCase(OETestCase): | |||
21 | archive = os.path.basename(urlparse(url).path) | 22 | archive = os.path.basename(urlparse(url).path) |
22 | 23 | ||
23 | if dl_dir: | 24 | if dl_dir: |
24 | tarball = os.path.join(dl_dir, archive) | 25 | archive_tarball = os.path.join(dl_dir, archive) |
25 | if os.path.exists(tarball): | 26 | if os.path.exists(archive_tarball): |
26 | return tarball | 27 | return archive_tarball |
27 | 28 | ||
28 | tarball = os.path.join(workdir, archive) | 29 | tarball = os.path.join(workdir, archive) |
29 | subprocess.check_output(["wget", "-O", tarball, url], stderr=subprocess.STDOUT) | 30 | subprocess.check_output(["wget", "-O", tarball, url], stderr=subprocess.STDOUT) |
31 | if dl_dir and not os.path.exists(archive_tarball): | ||
32 | shutil.copyfile(tarball, archive_tarball) | ||
30 | return tarball | 33 | return tarball |
31 | 34 | ||
32 | def check_elf(self, path, target_os=None, target_arch=None): | 35 | def check_elf(self, path, target_os=None, target_arch=None): |
diff --git a/meta/lib/oeqa/sdk/cases/buildcpio.py b/meta/lib/oeqa/sdk/cases/autotools.py index 51003b19cd..848e9392ec 100644 --- a/meta/lib/oeqa/sdk/cases/buildcpio.py +++ b/meta/lib/oeqa/sdk/cases/autotools.py | |||
@@ -7,13 +7,12 @@ | |||
7 | import os | 7 | import os |
8 | import tempfile | 8 | import tempfile |
9 | import subprocess | 9 | import subprocess |
10 | import unittest | ||
11 | 10 | ||
12 | from oeqa.sdk.case import OESDKTestCase | 11 | from oeqa.sdk.case import OESDKTestCase |
13 | from oeqa.utils.subprocesstweak import errors_have_output | 12 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | errors_have_output() | 13 | errors_have_output() |
15 | 14 | ||
16 | class BuildCpioTest(OESDKTestCase): | 15 | class AutotoolsTest(OESDKTestCase): |
17 | """ | 16 | """ |
18 | Check that autotools will cross-compile correctly. | 17 | Check that autotools will cross-compile correctly. |
19 | """ | 18 | """ |
diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/cmake.py index e986838aea..db7d826a38 100644 --- a/meta/lib/oeqa/sdk/cases/assimp.py +++ b/meta/lib/oeqa/sdk/cases/cmake.py | |||
@@ -13,7 +13,7 @@ from oeqa.sdk.case import OESDKTestCase | |||
13 | from oeqa.utils.subprocesstweak import errors_have_output | 13 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | errors_have_output() | 14 | errors_have_output() |
15 | 15 | ||
16 | class BuildAssimp(OESDKTestCase): | 16 | class CMakeTest(OESDKTestCase): |
17 | """ | 17 | """ |
18 | Test case to build a project using cmake. | 18 | Test case to build a project using cmake. |
19 | """ | 19 | """ |
@@ -21,14 +21,14 @@ class BuildAssimp(OESDKTestCase): | |||
21 | def setUp(self): | 21 | def setUp(self): |
22 | if not (self.tc.hasHostPackage("nativesdk-cmake") or | 22 | if not (self.tc.hasHostPackage("nativesdk-cmake") or |
23 | self.tc.hasHostPackage("cmake-native")): | 23 | self.tc.hasHostPackage("cmake-native")): |
24 | raise unittest.SkipTest("Needs cmake") | 24 | raise unittest.SkipTest("CMakeTest: needs cmake") |
25 | 25 | ||
26 | def test_assimp(self): | 26 | def test_assimp(self): |
27 | with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: | 27 | with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: |
28 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.3.1.tar.gz") | 28 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.4.1.tar.gz") |
29 | 29 | ||
30 | dirs = {} | 30 | dirs = {} |
31 | dirs["source"] = os.path.join(testdir, "assimp-5.3.1") | 31 | dirs["source"] = os.path.join(testdir, "assimp-5.4.1") |
32 | dirs["build"] = os.path.join(testdir, "build") | 32 | dirs["build"] = os.path.join(testdir, "build") |
33 | dirs["install"] = os.path.join(testdir, "install") | 33 | dirs["install"] = os.path.join(testdir, "install") |
34 | 34 | ||
@@ -39,7 +39,7 @@ class BuildAssimp(OESDKTestCase): | |||
39 | self._run("sed -i '/# ifdef _FILE_OFFSET_BITS/I,+2 d' {source}/contrib/zlib/gzguts.h".format(**dirs)) | 39 | self._run("sed -i '/# ifdef _FILE_OFFSET_BITS/I,+2 d' {source}/contrib/zlib/gzguts.h".format(**dirs)) |
40 | os.makedirs(dirs["build"]) | 40 | os.makedirs(dirs["build"]) |
41 | 41 | ||
42 | self._run("cd {build} && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**dirs)) | 42 | self._run("cd {build} && cmake -DASSIMP_WARNINGS_AS_ERRORS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**dirs)) |
43 | self._run("cmake --build {build} -- -j".format(**dirs)) | 43 | self._run("cmake --build {build} -- -j".format(**dirs)) |
44 | self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**dirs)) | 44 | self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**dirs)) |
45 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.5.3.0")) | 45 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.5.4.1")) |
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/gtk3.py index 178f07472d..c329c4bb86 100644 --- a/meta/lib/oeqa/sdk/cases/buildgalculator.py +++ b/meta/lib/oeqa/sdk/cases/gtk3.py | |||
@@ -13,7 +13,7 @@ from oeqa.sdk.case import OESDKTestCase | |||
13 | from oeqa.utils.subprocesstweak import errors_have_output | 13 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | errors_have_output() | 14 | errors_have_output() |
15 | 15 | ||
16 | class GalculatorTest(OESDKTestCase): | 16 | class GTK3Test(OESDKTestCase): |
17 | """ | 17 | """ |
18 | Test that autotools and GTK+ 3 compiles correctly. | 18 | Test that autotools and GTK+ 3 compiles correctly. |
19 | """ | 19 | """ |
diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/makefile.py index b4b7d85b88..2ff54ce25f 100644 --- a/meta/lib/oeqa/sdk/cases/buildlzip.py +++ b/meta/lib/oeqa/sdk/cases/makefile.py | |||
@@ -4,12 +4,12 @@ | |||
4 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
5 | # | 5 | # |
6 | 6 | ||
7 | import os, tempfile, subprocess, unittest | 7 | import os, tempfile, subprocess |
8 | from oeqa.sdk.case import OESDKTestCase | 8 | from oeqa.sdk.case import OESDKTestCase |
9 | from oeqa.utils.subprocesstweak import errors_have_output | 9 | from oeqa.utils.subprocesstweak import errors_have_output |
10 | errors_have_output() | 10 | errors_have_output() |
11 | 11 | ||
12 | class BuildLzipTest(OESDKTestCase): | 12 | class MakefileTest(OESDKTestCase): |
13 | """ | 13 | """ |
14 | Test that "plain" compilation works, using just $CC $CFLAGS etc. | 14 | Test that "plain" compilation works, using just $CC $CFLAGS etc. |
15 | """ | 15 | """ |
diff --git a/meta/lib/oeqa/sdk/cases/maturin.py b/meta/lib/oeqa/sdk/cases/maturin.py index ea10f568b2..20f6b553d0 100644 --- a/meta/lib/oeqa/sdk/cases/maturin.py +++ b/meta/lib/oeqa/sdk/cases/maturin.py | |||
@@ -8,7 +8,6 @@ import os | |||
8 | import shutil | 8 | import shutil |
9 | import unittest | 9 | import unittest |
10 | 10 | ||
11 | from oeqa.core.utils.path import remove_safe | ||
12 | from oeqa.sdk.case import OESDKTestCase | 11 | from oeqa.sdk.case import OESDKTestCase |
13 | from oeqa.utils.subprocesstweak import errors_have_output | 12 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | 13 | ||
diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/meson.py index 147ee3e0ee..be53df204a 100644 --- a/meta/lib/oeqa/sdk/cases/buildepoxy.py +++ b/meta/lib/oeqa/sdk/cases/meson.py | |||
@@ -13,14 +13,14 @@ from oeqa.sdk.case import OESDKTestCase | |||
13 | from oeqa.utils.subprocesstweak import errors_have_output | 13 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | errors_have_output() | 14 | errors_have_output() |
15 | 15 | ||
16 | class EpoxyTest(OESDKTestCase): | 16 | class MesonTest(OESDKTestCase): |
17 | """ | 17 | """ |
18 | Test that Meson builds correctly. | 18 | Test that Meson builds correctly. |
19 | """ | 19 | """ |
20 | def setUp(self): | 20 | def setUp(self): |
21 | if not (self.tc.hasHostPackage("nativesdk-meson") or | 21 | if not (self.tc.hasHostPackage("nativesdk-meson") or |
22 | self.tc.hasHostPackage("meson-native")): | 22 | self.tc.hasHostPackage("meson-native")): |
23 | raise unittest.SkipTest("EpoxyTest class: SDK doesn't contain Meson") | 23 | raise unittest.SkipTest("MesonTest: needs meson") |
24 | 24 | ||
25 | def test_epoxy(self): | 25 | def test_epoxy(self): |
26 | with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir: | 26 | with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir: |
diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py index 5ea992b9f3..51284949f5 100644 --- a/meta/lib/oeqa/sdk/cases/python.py +++ b/meta/lib/oeqa/sdk/cases/python.py | |||
@@ -4,7 +4,7 @@ | |||
4 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
5 | # | 5 | # |
6 | 6 | ||
7 | import subprocess, unittest | 7 | import unittest |
8 | from oeqa.sdk.case import OESDKTestCase | 8 | from oeqa.sdk.case import OESDKTestCase |
9 | 9 | ||
10 | from oeqa.utils.subprocesstweak import errors_have_output | 10 | from oeqa.utils.subprocesstweak import errors_have_output |
diff --git a/meta/lib/oeqa/sdk/cases/rust.py b/meta/lib/oeqa/sdk/cases/rust.py index f5d437bb19..a54245851b 100644 --- a/meta/lib/oeqa/sdk/cases/rust.py +++ b/meta/lib/oeqa/sdk/cases/rust.py | |||
@@ -8,7 +8,6 @@ import os | |||
8 | import shutil | 8 | import shutil |
9 | import unittest | 9 | import unittest |
10 | 10 | ||
11 | from oeqa.core.utils.path import remove_safe | ||
12 | from oeqa.sdk.case import OESDKTestCase | 11 | from oeqa.sdk.case import OESDKTestCase |
13 | 12 | ||
14 | from oeqa.utils.subprocesstweak import errors_have_output | 13 | from oeqa.utils.subprocesstweak import errors_have_output |