[oe-commits] [openembedded-core] 11/15: oeqa/sdk/assimp: use helpers

git at git.openembedded.org git at git.openembedded.org
Sat Dec 8 17:18:17 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 32a779281395748f4ab03a13e16ed5eb5c9e0394
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Fri Dec 7 21:25:00 2018 +0000

    oeqa/sdk/assimp: use helpers
---
 meta/lib/oeqa/sdk/cases/assimp.py | 29 +----------------------------
 1 file changed, 1 insertion(+), 28 deletions(-)

diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py
index f5c7547..21c9106 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"))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list