From patchwork Mon Jan 7 16:38:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 154916 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3674923ljp; Mon, 7 Jan 2019 08:39:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN59DYcCL6wWkdIvHH4CwBXi3g/XMpmvQ20BMJp7Go7nAbtx+wanrL9px0PJyX/69aeEMW8w X-Received: by 2002:a63:4246:: with SMTP id p67mr11415596pga.335.1546879166023; Mon, 07 Jan 2019 08:39:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546879166; cv=none; d=google.com; s=arc-20160816; b=Sjweiu8VY2jGg96Xva4k5UJC7497PUSf+QOXYtBUS4wWG3D2oeQPOo7J8WcNa3lAVM Z9S1sIxbZZEbuUqBdfjW7h696yGO/iXKm/DFWNb/l6kFyLOoE7Q7RhnNSnLqf6pideMX NHm95vUz3k0obuCtjxh8XFSrqDORUrJF24CgwgesH0gI2Z0vVCmzZslyK2GpuEUCQbT6 QkRx8f0sEFZstyIBG8JddkeCKtjbMKnS1644SNGLtdQh3j+HdhULQFEBNLTAssyJRq32 wYObXpUPpS72v+6YyMpupFsWSv/NChR2Z/r8g19Kl7TDyzB7np87YbI9iNG6RxjFa+tv Ug2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=oNnBILL3CucdWM0XGbf6qqdfzndhIGWAqgcxMo+0//c=; b=o0NlK7dCxHUkBy9vG5/LmqoM4IKncWTaV9TxH4yKiIejkMsfK4UvenuAgX+7T9Ar8u lfj4qW+g0C0zP47GCYEdXUSPgSmPe0nGqveFczJIzJMEarzetBhgQQRPk1vnOOSPZ5Af k4GSTWpmPZil1f9NxS4DcK/cg5NCJqwk6m2cnrN9CrFiIOpwQ89Qs247AGYwLQJrGtUO a6ROygoW2KV9OUHtVmiiU+agI532FuSj6wiI7znJqrVBJ+ZsqKcGzagU8IsN0ZgSs4bl uB6Nlj9wlxhsTCBaKZ0OFKBd+nSvs7tdMpi7kpPH/pxpH+D06bUrJlbJ9cYSb4xFq7qt OXFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NygoYRtb; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id d11si62305923pla.335.2019.01.07.08.39.25; Mon, 07 Jan 2019 08:39:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NygoYRtb; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0CEAF7BF46; Mon, 7 Jan 2019 16:39:02 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mail.openembedded.org (Postfix) with ESMTP id D4C537BF0E for ; Mon, 7 Jan 2019 16:38:38 +0000 (UTC) Received: by mail-wm1-f44.google.com with SMTP id f81so1533139wmd.4 for ; Mon, 07 Jan 2019 08:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=wCMkiKqT7kKw9qeoRZAFsGg7VPWuG6LCe7XUKZnIyqE=; b=NygoYRtbnoo/IIV57qLIH9Cgyc1Zvg/Fzm20ADaoU9KfslaDAGEAawfbhBilfOfVMr kTTGzWpMW11yQKwSTo9nKT8ClWK1GCRsfDH3Eslp+Qi28Q2/ixn6+xhDbcWFlq95LSm+ QYX91sWseitQ8nnxqV1HjLzitgbmyt8C31GaaZ08VjeKdMxUGv1kX5qcr2yKx7dMT38/ j26CbSS8QL+yolL7olBr390KD/h/1g0ipSTgVFKgvNvQTK0Yc/S8bTogPmVdr7XTtOhC w5E8DcZTDQXpkSkHfiR2kzEgvA/tot1j1keD9ORK0qME8bmFs0n74STMp13/Ix4uvkYp deow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=wCMkiKqT7kKw9qeoRZAFsGg7VPWuG6LCe7XUKZnIyqE=; b=pwGHS30T3AG6d4/qIs6wLA+XkVXr7h5Vj+zpu0gnzOlIwtf8l4Mys7yypSLvBHRBs/ rXJRHhUcAWAi8ahvNBIFWVIaI8YR6ZzM1LfTz4PQezL5pQ7mBYzdgu1EGMdC+wGgJvE6 mJ7TsOW+Z9bLEmM3sUx8FGn7C3Zf90RU4kXePUcZKoM7eKSdd2XMjFsGqbbn3O/UYxE+ o9zYckM7JiMwjheN5H+tDoXs/5/4lNA/GkuJrNsm8GhbZP+eo1fICDxiPEQmuoQgOr8N iXo0OpEjtK9hjIJ55yS0aVC0VhI30uPRPC3GbhR0gsPG7rWqjWLT5YOg6AOJ+WNrvJRy K95g== X-Gm-Message-State: AJcUukek3QqfkJMcFIE/RazI64f/ANcsErvhbo9SzI1TLyaW80D8qoDh rPuGhzGGHRsr0p95Mgt81NBpMDQG1gY= X-Received: by 2002:a1c:ce0e:: with SMTP id e14mr9868425wmg.53.1546879119355; Mon, 07 Jan 2019 08:38:39 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id o5sm13918958wmg.25.2019.01.07.08.38.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 08:38:38 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 7 Jan 2019 16:38:22 +0000 Message-Id: <20190107163823.31816-6-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190107163823.31816-1-ross.burton@intel.com> References: <20190107163823.31816-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 6/7] oeqa/sdk/assimp: cleanup X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Unify style with the other tests. Signed-off-by: Ross Burton --- meta/lib/oeqa/sdk/cases/assimp.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py index 595f3834894..a6000103993 100644 --- a/meta/lib/oeqa/sdk/cases/assimp.py +++ b/meta/lib/oeqa/sdk/cases/assimp.py @@ -1,5 +1,7 @@ -import os, subprocess, unittest -import bb +import os +import subprocess +import tempfile +import unittest from oeqa.sdk.case import OESDKTestCase from oeqa.utils.subprocesstweak import errors_have_output @@ -10,25 +12,25 @@ class BuildAssimp(OESDKTestCase): Test case to build a project using cmake. """ - td_vars = ['DATETIME', 'TARGET_OS', 'TARGET_ARCH'] - def setUp(self): if not (self.tc.hasHostPackage("nativesdk-cmake") or self.tc.hasHostPackage("cmake-native")): raise unittest.SkipTest("Needs cmake") def test_assimp(self): - import tempfile with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v4.1.0.tar.gz") - subprocess.check_output(["tar", "xf", tarball, "-C", testdir]) - sourcedir = os.path.join(testdir, "assimp-4.1.0") - builddir = os.path.join(testdir, "build") - installdir = os.path.join(testdir, "install") - bb.utils.mkdirhier(builddir) + dirs = {} + dirs["source"] = os.path.join(testdir, "assimp-4.1.0") + dirs["build"] = os.path.join(testdir, "build") + dirs["install"] = os.path.join(testdir, "install") + + subprocess.check_output(["tar", "xf", tarball, "-C", testdir]) + self.assertTrue(os.path.isdir(dirs["source"])) + os.makedirs(dirs["build"]) - 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)) - self.check_elf(os.path.join(installdir, "usr", "local", "lib", "libassimp.so.4.1.0")) + self._run("cd {build} && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON {source}".format(**dirs)) + self._run("cmake --build {build} -- -j".format(**dirs)) + self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**dirs)) + self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.4.1.0"))