summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-12-07 21:25:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-08 17:16:55 +0000
commit32a779281395748f4ab03a13e16ed5eb5c9e0394 (patch)
treedbafe73b571f079386427d640a81f16a3cfa575c /meta/lib
parent2a652bcf66ff4d5cccb1eb9520f68d1547e8d4d4 (diff)
downloadopenembedded-core-contrib-32a779281395748f4ab03a13e16ed5eb5c9e0394.tar.gz
openembedded-core-contrib-32a779281395748f4ab03a13e16ed5eb5c9e0394.tar.bz2
openembedded-core-contrib-32a779281395748f4ab03a13e16ed5eb5c9e0394.zip
oeqa/sdk/assimp: use helpers
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/sdk/cases/assimp.py29
1 files changed, 1 insertions, 28 deletions
diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py
index f5c7547b88..21c9106881 100644
--- a/meta/lib/oeqa/sdk/cases/assimp.py
+++ b/meta/lib/oeqa/sdk/cases/assimp.py
@@ -17,24 +17,8 @@ class BuildAssimp(OESDKTestCase):
self.tc.hasHostPackage("cmake-native")):
raise unittest.SkipTest("Needs cmake")
- def fetch(self, workdir, dl_dir, url, archive=None):
- if not archive:
- from urllib.parse import urlparse
- archive = os.path.basename(urlparse(url).path)
-
- if dl_dir:
- tarball = os.path.join(dl_dir, archive)
- if os.path.exists(tarball):
- return tarball
-
- tarball = os.path.join(workdir, archive)
- subprocess.check_output(["wget", "-O", tarball, url])
- return tarball
-
def test_assimp(self):
import tempfile
- import oe.qa, oe.elf
-
with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir:
dl_dir = self.td.get('DL_DIR', None)
tarball = self.fetch(testdir, dl_dir, "https://github.com/assimp/assimp/archive/v4.1.0.tar.gz")
@@ -48,15 +32,4 @@ class BuildAssimp(OESDKTestCase):
self._run("cd %s && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON %s " % (builddir, sourcedir))
self._run("cmake --build %s -- -j" % builddir)
self._run("cmake --build %s --target install -- DESTDIR=%s" % (builddir, installdir))
-
- elf = oe.qa.ELFFile(os.path.join(installdir, "usr", "local", "lib", "libassimp.so.4.1.0"))
- elf.open()
-
- output = self._run("echo $OECORE_TARGET_OS:$OECORE_TARGET_ARCH")
- target_os, target_arch = output.strip().split(":")
- machine_data = oe.elf.machine_dict(None)[target_os][target_arch]
- (machine, osabi, abiversion, endian, bits) = machine_data
-
- self.assertEqual(machine, elf.machine())
- self.assertEqual(bits, elf.abiSize())
- self.assertEqual(endian, elf.isLittleEndian())
+ self.check_elf(os.path.join(installdir, "usr", "local", "lib", "libassimp.so.4.1.0"))