diff options
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/stap.py | 6 | ||||
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/autotools.py | 6 | ||||
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/cmake.py | 6 | ||||
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/kmod.py | 6 | ||||
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/makefile.py | 6 |
5 files changed, 25 insertions, 5 deletions
diff --git a/meta/lib/oeqa/runtime/cases/stap.py b/meta/lib/oeqa/runtime/cases/stap.py index 6b55e7de50..d83cb0b2b8 100644 --- a/meta/lib/oeqa/runtime/cases/stap.py +++ b/meta/lib/oeqa/runtime/cases/stap.py | |||
| @@ -16,8 +16,12 @@ class StapTest(OERuntimeTestCase): | |||
| 16 | @OEHasPackage(['gcc-symlinks']) | 16 | @OEHasPackage(['gcc-symlinks']) |
| 17 | @OEHasPackage(['kernel-devsrc']) | 17 | @OEHasPackage(['kernel-devsrc']) |
| 18 | def test_stap(self): | 18 | def test_stap(self): |
| 19 | from oe.utils import parallel_make_value | ||
| 20 | pmv = parallel_make_value((self.td.get('PARALLEL_MAKE') or '').split()) | ||
| 21 | parallel_make = "-j %d" % (pmv) if pmv else "" | ||
| 22 | |||
| 19 | try: | 23 | try: |
| 20 | cmd = 'make -j -C /usr/src/kernel scripts prepare' | 24 | cmd = 'make %s -C /usr/src/kernel scripts prepare' % (parallel_make) |
| 21 | status, output = self.target.run(cmd, 900) | 25 | status, output = self.target.run(cmd, 900) |
| 22 | self.assertEqual(status, 0, msg='\n'.join([cmd, output])) | 26 | self.assertEqual(status, 0, msg='\n'.join([cmd, output])) |
| 23 | 27 | ||
diff --git a/meta/lib/oeqa/sdk/cases/autotools.py b/meta/lib/oeqa/sdk/cases/autotools.py index f641d66015..3f51854e3d 100644 --- a/meta/lib/oeqa/sdk/cases/autotools.py +++ b/meta/lib/oeqa/sdk/cases/autotools.py | |||
| @@ -23,6 +23,9 @@ class AutotoolsTest(OESDKTestCase): | |||
| 23 | raise unittest.SkipTest("AutotoolsTest class: SDK doesn't contain a supported C library") | 23 | raise unittest.SkipTest("AutotoolsTest class: SDK doesn't contain a supported C library") |
| 24 | 24 | ||
| 25 | def test_cpio(self): | 25 | def test_cpio(self): |
| 26 | from oe.utils import parallel_make_value | ||
| 27 | pmv = parallel_make_value((self.td.get('PARALLEL_MAKE') or '').split()) | ||
| 28 | |||
| 26 | with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir: | 29 | with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir: |
| 27 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz") | 30 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz") |
| 28 | 31 | ||
| @@ -30,6 +33,7 @@ class AutotoolsTest(OESDKTestCase): | |||
| 30 | opts["source"] = os.path.join(testdir, "cpio-2.15") | 33 | opts["source"] = os.path.join(testdir, "cpio-2.15") |
| 31 | opts["build"] = os.path.join(testdir, "build") | 34 | opts["build"] = os.path.join(testdir, "build") |
| 32 | opts["install"] = os.path.join(testdir, "install") | 35 | opts["install"] = os.path.join(testdir, "install") |
| 36 | opts["parallel_make"] = "-j %d" % (pmv) if pmv else "" | ||
| 33 | 37 | ||
| 34 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) | 38 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) |
| 35 | self.assertTrue(os.path.isdir(opts["source"])) | 39 | self.assertTrue(os.path.isdir(opts["source"])) |
| @@ -42,7 +46,7 @@ class AutotoolsTest(OESDKTestCase): | |||
| 42 | host_sys = self.td["HOST_SYS"] | 46 | host_sys = self.td["HOST_SYS"] |
| 43 | self.assertIn(f"host_alias='{host_sys}'\n", f.readlines()) | 47 | self.assertIn(f"host_alias='{host_sys}'\n", f.readlines()) |
| 44 | 48 | ||
| 45 | self._run("cd {build} && make CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' -j".format(**opts)) | 49 | self._run("cd {build} && make CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' {parallel_make}".format(**opts)) |
| 46 | self._run("cd {build} && make install DESTDIR={install}".format(**opts)) | 50 | self._run("cd {build} && make install DESTDIR={install}".format(**opts)) |
| 47 | 51 | ||
| 48 | self.check_elf(os.path.join(opts["install"], "usr", "local", "bin", "cpio")) | 52 | self.check_elf(os.path.join(opts["install"], "usr", "local", "bin", "cpio")) |
diff --git a/meta/lib/oeqa/sdk/cases/cmake.py b/meta/lib/oeqa/sdk/cases/cmake.py index 32b951c0f8..81fd327ca3 100644 --- a/meta/lib/oeqa/sdk/cases/cmake.py +++ b/meta/lib/oeqa/sdk/cases/cmake.py | |||
| @@ -26,6 +26,9 @@ class CMakeTest(OESDKTestCase): | |||
| 26 | self.ensure_host_package("cmake") | 26 | self.ensure_host_package("cmake") |
| 27 | 27 | ||
| 28 | def test_assimp(self): | 28 | def test_assimp(self): |
| 29 | from oe.utils import parallel_make_value | ||
| 30 | pmv = parallel_make_value((self.td.get('PARALLEL_MAKE') or '').split()) | ||
| 31 | |||
| 29 | with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: | 32 | with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: |
| 30 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.4.1.tar.gz") | 33 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.4.1.tar.gz") |
| 31 | 34 | ||
| @@ -33,6 +36,7 @@ class CMakeTest(OESDKTestCase): | |||
| 33 | opts["source"] = os.path.join(testdir, "assimp-5.4.1") | 36 | opts["source"] = os.path.join(testdir, "assimp-5.4.1") |
| 34 | opts["build"] = os.path.join(testdir, "build") | 37 | opts["build"] = os.path.join(testdir, "build") |
| 35 | opts["install"] = os.path.join(testdir, "install") | 38 | opts["install"] = os.path.join(testdir, "install") |
| 39 | opts["parallel_make"] = "-j %d" % (pmv) if pmv else "" | ||
| 36 | 40 | ||
| 37 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) | 41 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) |
| 38 | self.assertTrue(os.path.isdir(opts["source"])) | 42 | self.assertTrue(os.path.isdir(opts["source"])) |
| @@ -42,6 +46,6 @@ class CMakeTest(OESDKTestCase): | |||
| 42 | os.makedirs(opts["build"]) | 46 | os.makedirs(opts["build"]) |
| 43 | 47 | ||
| 44 | self._run("cd {build} && cmake -DASSIMP_WARNINGS_AS_ERRORS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**opts)) | 48 | self._run("cd {build} && cmake -DASSIMP_WARNINGS_AS_ERRORS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**opts)) |
| 45 | self._run("cmake --build {build} -- -j".format(**opts)) | 49 | self._run("cmake --build {build} -- {parallel_make}".format(**opts)) |
| 46 | self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**opts)) | 50 | self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**opts)) |
| 47 | self.check_elf(os.path.join(opts["install"], "usr", "local", "lib", "libassimp.so.5.4.1")) | 51 | self.check_elf(os.path.join(opts["install"], "usr", "local", "lib", "libassimp.so.5.4.1")) |
diff --git a/meta/lib/oeqa/sdk/cases/kmod.py b/meta/lib/oeqa/sdk/cases/kmod.py index 0aa6f702e4..0c4d8ddb54 100644 --- a/meta/lib/oeqa/sdk/cases/kmod.py +++ b/meta/lib/oeqa/sdk/cases/kmod.py | |||
| @@ -21,9 +21,13 @@ class KernelModuleTest(OESDKTestCase): | |||
| 21 | if isinstance(self.tc, OESDKExtTestContext): | 21 | if isinstance(self.tc, OESDKExtTestContext): |
| 22 | self.skipTest(f"{self.id()} does not support eSDK (https://bugzilla.yoctoproject.org/show_bug.cgi?id=15850)") | 22 | self.skipTest(f"{self.id()} does not support eSDK (https://bugzilla.yoctoproject.org/show_bug.cgi?id=15850)") |
| 23 | 23 | ||
| 24 | from oe.utils import parallel_make_value | ||
| 25 | pmv = parallel_make_value((self.td.get('PARALLEL_MAKE') or '').split()) | ||
| 26 | parallel_make = "-j %d" % (pmv) if pmv else "" | ||
| 27 | |||
| 24 | self.ensure_target_package("kernel-devsrc") | 28 | self.ensure_target_package("kernel-devsrc") |
| 25 | # These targets need to be built before kernel modules can be built. | 29 | # These targets need to be built before kernel modules can be built. |
| 26 | self._run("make -j -C $OECORE_TARGET_SYSROOT/usr/src/kernel prepare scripts") | 30 | self._run("make %s -C $OECORE_TARGET_SYSROOT/usr/src/kernel prepare scripts" % (parallel_make)) |
| 27 | 31 | ||
| 28 | with tempfile.TemporaryDirectory(prefix="cryptodev", dir=self.tc.sdk_dir) as testdir: | 32 | with tempfile.TemporaryDirectory(prefix="cryptodev", dir=self.tc.sdk_dir) as testdir: |
| 29 | git_url = "https://github.com/cryptodev-linux/cryptodev-linux" | 33 | git_url = "https://github.com/cryptodev-linux/cryptodev-linux" |
diff --git a/meta/lib/oeqa/sdk/cases/makefile.py b/meta/lib/oeqa/sdk/cases/makefile.py index 0dcf94c6d7..fc041ca8d8 100644 --- a/meta/lib/oeqa/sdk/cases/makefile.py +++ b/meta/lib/oeqa/sdk/cases/makefile.py | |||
| @@ -20,6 +20,9 @@ class MakefileTest(OESDKTestCase): | |||
| 20 | raise unittest.SkipTest("MakefileTest class: SDK doesn't contain a supported C library") | 20 | raise unittest.SkipTest("MakefileTest class: SDK doesn't contain a supported C library") |
| 21 | 21 | ||
| 22 | def test_lzip(self): | 22 | def test_lzip(self): |
| 23 | from oe.utils import parallel_make_value | ||
| 24 | pmv = parallel_make_value((self.td.get('PARALLEL_MAKE') or '').split()) | ||
| 25 | |||
| 23 | with tempfile.TemporaryDirectory(prefix="lzip", dir=self.tc.sdk_dir) as testdir: | 26 | with tempfile.TemporaryDirectory(prefix="lzip", dir=self.tc.sdk_dir) as testdir: |
| 24 | tarball = self.fetch(testdir, self.td["DL_DIR"], "http://downloads.yoctoproject.org/mirror/sources/lzip-1.19.tar.gz") | 27 | tarball = self.fetch(testdir, self.td["DL_DIR"], "http://downloads.yoctoproject.org/mirror/sources/lzip-1.19.tar.gz") |
| 25 | 28 | ||
| @@ -27,6 +30,7 @@ class MakefileTest(OESDKTestCase): | |||
| 27 | opts["source"] = os.path.join(testdir, "lzip-1.19") | 30 | opts["source"] = os.path.join(testdir, "lzip-1.19") |
| 28 | opts["build"] = os.path.join(testdir, "build") | 31 | opts["build"] = os.path.join(testdir, "build") |
| 29 | opts["install"] = os.path.join(testdir, "install") | 32 | opts["install"] = os.path.join(testdir, "install") |
| 33 | opts["parallel_make"] = "-j %d" % (pmv) if pmv else "" | ||
| 30 | 34 | ||
| 31 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) | 35 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) |
| 32 | self.assertTrue(os.path.isdir(opts["source"])) | 36 | self.assertTrue(os.path.isdir(opts["source"])) |
| @@ -40,6 +44,6 @@ class MakefileTest(OESDKTestCase): | |||
| 40 | LDFLAGS="$LDFLAGS" \ | 44 | LDFLAGS="$LDFLAGS" \ |
| 41 | """ | 45 | """ |
| 42 | self._run(cmd.format(**opts)) | 46 | self._run(cmd.format(**opts)) |
| 43 | self._run("cd {build} && make -j".format(**opts)) | 47 | self._run("cd {build} && make {parallel_make}".format(**opts)) |
| 44 | self._run("cd {build} && make install DESTDIR={install}".format(**opts)) | 48 | self._run("cd {build} && make install DESTDIR={install}".format(**opts)) |
| 45 | self.check_elf(os.path.join(opts["install"], "usr", "local", "bin", "lzip")) | 49 | self.check_elf(os.path.join(opts["install"], "usr", "local", "bin", "lzip")) |
