diff options
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/autotools.py | 22 | ||||
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/cmake.py | 22 | ||||
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/makefile.py | 20 |
3 files changed, 32 insertions, 32 deletions
diff --git a/meta/lib/oeqa/sdk/cases/autotools.py b/meta/lib/oeqa/sdk/cases/autotools.py index ee6c522551..f641d66015 100644 --- a/meta/lib/oeqa/sdk/cases/autotools.py +++ b/meta/lib/oeqa/sdk/cases/autotools.py | |||
| @@ -26,23 +26,23 @@ class AutotoolsTest(OESDKTestCase): | |||
| 26 | with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir: | 26 | 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") | 27 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz") |
| 28 | 28 | ||
| 29 | dirs = {} | 29 | opts = {} |
| 30 | dirs["source"] = os.path.join(testdir, "cpio-2.15") | 30 | opts["source"] = os.path.join(testdir, "cpio-2.15") |
| 31 | dirs["build"] = os.path.join(testdir, "build") | 31 | opts["build"] = os.path.join(testdir, "build") |
| 32 | dirs["install"] = os.path.join(testdir, "install") | 32 | opts["install"] = os.path.join(testdir, "install") |
| 33 | 33 | ||
| 34 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) | 34 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) |
| 35 | self.assertTrue(os.path.isdir(dirs["source"])) | 35 | self.assertTrue(os.path.isdir(opts["source"])) |
| 36 | os.makedirs(dirs["build"]) | 36 | os.makedirs(opts["build"]) |
| 37 | 37 | ||
| 38 | self._run("cd {build} && {source}/configure CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' $CONFIGURE_FLAGS".format(**dirs)) | 38 | self._run("cd {build} && {source}/configure CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' $CONFIGURE_FLAGS".format(**opts)) |
| 39 | 39 | ||
| 40 | # Check that configure detected the target correctly | 40 | # Check that configure detected the target correctly |
| 41 | with open(os.path.join(dirs["build"], "config.log")) as f: | 41 | with open(os.path.join(opts["build"], "config.log")) as f: |
| 42 | host_sys = self.td["HOST_SYS"] | 42 | host_sys = self.td["HOST_SYS"] |
| 43 | self.assertIn(f"host_alias='{host_sys}'\n", f.readlines()) | 43 | self.assertIn(f"host_alias='{host_sys}'\n", f.readlines()) |
| 44 | 44 | ||
| 45 | self._run("cd {build} && make CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' -j".format(**dirs)) | 45 | self._run("cd {build} && make CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' -j".format(**opts)) |
| 46 | self._run("cd {build} && make install DESTDIR={install}".format(**dirs)) | 46 | self._run("cd {build} && make install DESTDIR={install}".format(**opts)) |
| 47 | 47 | ||
| 48 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "cpio")) | 48 | 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 070682ef08..32b951c0f8 100644 --- a/meta/lib/oeqa/sdk/cases/cmake.py +++ b/meta/lib/oeqa/sdk/cases/cmake.py | |||
| @@ -29,19 +29,19 @@ class CMakeTest(OESDKTestCase): | |||
| 29 | with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: | 29 | 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") | 30 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.4.1.tar.gz") |
| 31 | 31 | ||
| 32 | dirs = {} | 32 | opts = {} |
| 33 | dirs["source"] = os.path.join(testdir, "assimp-5.4.1") | 33 | opts["source"] = os.path.join(testdir, "assimp-5.4.1") |
| 34 | dirs["build"] = os.path.join(testdir, "build") | 34 | opts["build"] = os.path.join(testdir, "build") |
| 35 | dirs["install"] = os.path.join(testdir, "install") | 35 | opts["install"] = os.path.join(testdir, "install") |
| 36 | 36 | ||
| 37 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) | 37 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) |
| 38 | self.assertTrue(os.path.isdir(dirs["source"])) | 38 | self.assertTrue(os.path.isdir(opts["source"])) |
| 39 | # Apply the zlib patch https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3 | 39 | # Apply the zlib patch https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3 |
| 40 | # this sed wont be needed once assimp moves its zlib copy to v1.3.1+ | 40 | # this sed wont be needed once assimp moves its zlib copy to v1.3.1+ |
| 41 | self._run("sed -i '/# ifdef _FILE_OFFSET_BITS/I,+2 d' {source}/contrib/zlib/gzguts.h".format(**dirs)) | 41 | self._run("sed -i '/# ifdef _FILE_OFFSET_BITS/I,+2 d' {source}/contrib/zlib/gzguts.h".format(**opts)) |
| 42 | os.makedirs(dirs["build"]) | 42 | os.makedirs(opts["build"]) |
| 43 | 43 | ||
| 44 | self._run("cd {build} && cmake -DASSIMP_WARNINGS_AS_ERRORS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**dirs)) | 44 | 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(**dirs)) | 45 | self._run("cmake --build {build} -- -j".format(**opts)) |
| 46 | self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**dirs)) | 46 | self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**opts)) |
| 47 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.5.4.1")) | 47 | self.check_elf(os.path.join(opts["install"], "usr", "local", "lib", "libassimp.so.5.4.1")) |
diff --git a/meta/lib/oeqa/sdk/cases/makefile.py b/meta/lib/oeqa/sdk/cases/makefile.py index e1e2484820..0dcf94c6d7 100644 --- a/meta/lib/oeqa/sdk/cases/makefile.py +++ b/meta/lib/oeqa/sdk/cases/makefile.py | |||
| @@ -23,14 +23,14 @@ class MakefileTest(OESDKTestCase): | |||
| 23 | with tempfile.TemporaryDirectory(prefix="lzip", dir=self.tc.sdk_dir) as testdir: | 23 | 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") | 24 | tarball = self.fetch(testdir, self.td["DL_DIR"], "http://downloads.yoctoproject.org/mirror/sources/lzip-1.19.tar.gz") |
| 25 | 25 | ||
| 26 | dirs = {} | 26 | opts = {} |
| 27 | dirs["source"] = os.path.join(testdir, "lzip-1.19") | 27 | opts["source"] = os.path.join(testdir, "lzip-1.19") |
| 28 | dirs["build"] = os.path.join(testdir, "build") | 28 | opts["build"] = os.path.join(testdir, "build") |
| 29 | dirs["install"] = os.path.join(testdir, "install") | 29 | opts["install"] = os.path.join(testdir, "install") |
| 30 | 30 | ||
| 31 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) | 31 | subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) |
| 32 | self.assertTrue(os.path.isdir(dirs["source"])) | 32 | self.assertTrue(os.path.isdir(opts["source"])) |
| 33 | os.makedirs(dirs["build"]) | 33 | os.makedirs(opts["build"]) |
| 34 | 34 | ||
| 35 | cmd = """cd {build} && \ | 35 | cmd = """cd {build} && \ |
| 36 | {source}/configure --srcdir {source} \ | 36 | {source}/configure --srcdir {source} \ |
| @@ -39,7 +39,7 @@ class MakefileTest(OESDKTestCase): | |||
| 39 | CXXFLAGS="$CXXFLAGS" \ | 39 | CXXFLAGS="$CXXFLAGS" \ |
| 40 | LDFLAGS="$LDFLAGS" \ | 40 | LDFLAGS="$LDFLAGS" \ |
| 41 | """ | 41 | """ |
| 42 | self._run(cmd.format(**dirs)) | 42 | self._run(cmd.format(**opts)) |
| 43 | self._run("cd {build} && make -j".format(**dirs)) | 43 | self._run("cd {build} && make -j".format(**opts)) |
| 44 | self._run("cd {build} && make install DESTDIR={install}".format(**dirs)) | 44 | self._run("cd {build} && make install DESTDIR={install}".format(**opts)) |
| 45 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "lzip")) | 45 | self.check_elf(os.path.join(opts["install"], "usr", "local", "bin", "lzip")) |
