summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/cases/assimp.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/sdk/cases/assimp.py')
-rw-r--r--meta/lib/oeqa/sdk/cases/assimp.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py
deleted file mode 100644
index e986838aea..0000000000
--- a/meta/lib/oeqa/sdk/cases/assimp.py
+++ /dev/null
@@ -1,45 +0,0 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7import os
8import subprocess
9import tempfile
10import unittest
11from oeqa.sdk.case import OESDKTestCase
12
13from oeqa.utils.subprocesstweak import errors_have_output
14errors_have_output()
15
16class BuildAssimp(OESDKTestCase):
17 """
18 Test case to build a project using cmake.
19 """
20
21 def setUp(self):
22 if not (self.tc.hasHostPackage("nativesdk-cmake") or
23 self.tc.hasHostPackage("cmake-native")):
24 raise unittest.SkipTest("Needs cmake")
25
26 def test_assimp(self):
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")
29
30 dirs = {}
31 dirs["source"] = os.path.join(testdir, "assimp-5.3.1")
32 dirs["build"] = os.path.join(testdir, "build")
33 dirs["install"] = os.path.join(testdir, "install")
34
35 subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT)
36 self.assertTrue(os.path.isdir(dirs["source"]))
37 # Apply the zlib patch https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3
38 # this sed wont be needed once assimp moves its zlib copy to v1.3.1+
39 self._run("sed -i '/# ifdef _FILE_OFFSET_BITS/I,+2 d' {source}/contrib/zlib/gzguts.h".format(**dirs))
40 os.makedirs(dirs["build"])
41
42 self._run("cd {build} && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**dirs))
43 self._run("cmake --build {build} -- -j".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"))