From patchwork Wed Mar 1 16:02:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 94713 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1865433qgi; Wed, 1 Mar 2017 08:03:33 -0800 (PST) X-Received: by 10.84.129.3 with SMTP id 3mr11381959plb.150.1488384212953; Wed, 01 Mar 2017 08:03:32 -0800 (PST) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id q9si4963876pgn.76.2017.03.01.08.03.32; Wed, 01 Mar 2017 08:03:32 -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; 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 Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B4BF17756E; Wed, 1 Mar 2017 16:03:00 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id A5FF577534 for ; Wed, 1 Mar 2017 16:02:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2pS7011995; Wed, 1 Mar 2017 16:02:51 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hLNssj4IGaVU; Wed, 1 Mar 2017 16:02:51 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2kDo011972 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 1 Mar 2017 16:02:47 GMT Received: from richard by hex with local (Exim 4.86_2) (envelope-from ) id 1cj6iE-0004nd-Kn; Wed, 01 Mar 2017 16:02:46 +0000 From: Richard Purdie To: openembedded-core@lists.openembedded.org Date: Wed, 1 Mar 2017 16:02:31 +0000 Message-Id: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.7.4 Subject: [OE-core] [PATCH 01/12] oeqa/sdkext/devtool: rename recipe name to match upstream 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 From: Ross Burton Call the generated recipe librdfa instead of bb-example to make it clearer what is happening. Signed-off-by: Ross Burton --- meta/lib/oeqa/sdkext/cases/devtool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index f0abc95..baa528f 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py @@ -73,7 +73,7 @@ class DevtoolTest(OESDKExtTestCase): @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_extend_autotools_recipe_creation(self): req = 'https://github.com/rdfa/librdfa' - recipe = "bbexample" + recipe = "librdfa" self._run('devtool add %s %s' % (recipe, req) ) try: self._run('devtool build %s' % recipe) From patchwork Wed Mar 1 16:02:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 94715 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1865690qgi; Wed, 1 Mar 2017 08:03:58 -0800 (PST) X-Received: by 10.84.232.198 with SMTP id x6mr11105070plm.74.1488384238403; Wed, 01 Mar 2017 08:03:58 -0800 (PST) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id q130si4946008pgq.205.2017.03.01.08.03.58; Wed, 01 Mar 2017 08:03:58 -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; 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 Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 4FF4877558; Wed, 1 Mar 2017 16:03:05 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 3C2A971B04 for ; Wed, 1 Mar 2017 16:02:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2pS9011995; Wed, 1 Mar 2017 16:02:51 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5fPpNJOBakw7; Wed, 1 Mar 2017 16:02:51 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2kHV011980 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 1 Mar 2017 16:02:47 GMT Received: from richard by hex with local (Exim 4.86_2) (envelope-from ) id 1cj6iE-0004oG-Px; Wed, 01 Mar 2017 16:02:46 +0000 From: Richard Purdie To: openembedded-core@lists.openembedded.org Date: Wed, 1 Mar 2017 16:02:39 +0000 Message-Id: <1488384162-18397-9-git-send-email-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> References: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> Subject: [OE-core] [PATCH 09/12] oeqa/esdk/devtool: clean setUpClass/tearDownClass 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 From: Ross Burton These methods are class not instance methods, so the argument should be cls not self. Also don't put variables into cls that we don't need there. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/sdkext/cases/devtool.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index baa528f..ffaa2f0 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py @@ -11,14 +11,19 @@ from oeqa.core.decorator.data import skipIfNotDataVar class DevtoolTest(OESDKExtTestCase): @classmethod - def setUpClass(self): - self.myapp_src = os.path.join(self.tc.esdk_files_dir, "myapp") - self.myapp_dst = os.path.join(self.tc.sdk_dir, "myapp") - shutil.copytree(self.myapp_src, self.myapp_dst) + def setUpClass(cls): + myapp_src = os.path.join(cls.tc.esdk_files_dir, "myapp") + cls.myapp_dst = os.path.join(cls.tc.sdk_dir, "myapp") + shutil.copytree(myapp_src, cls.myapp_dst) - self.myapp_cmake_src = os.path.join(self.tc.esdk_files_dir, "myapp_cmake") - self.myapp_cmake_dst = os.path.join(self.tc.sdk_dir, "myapp_cmake") - shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst) + myapp_cmake_src = os.path.join(cls.tc.esdk_files_dir, "myapp_cmake") + cls.myapp_cmake_dst = os.path.join(cls.tc.sdk_dir, "myapp_cmake") + shutil.copytree(myapp_cmake_src, cls.myapp_cmake_dst) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.myapp_dst) + shutil.rmtree(cls.myapp_cmake_dst) def _test_devtool_build(self, directory): self._run('devtool add myapp %s' % directory) @@ -111,8 +116,3 @@ class DevtoolTest(OESDKExtTestCase): self._run('devtool reset %s' % package_nodejs) raise e self._run('devtool reset %s '% package_nodejs) - - @classmethod - def tearDownClass(self): - shutil.rmtree(self.myapp_dst) - shutil.rmtree(self.myapp_cmake_dst) From patchwork Wed Mar 1 16:02:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 94716 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1865777qgi; Wed, 1 Mar 2017 08:04:07 -0800 (PST) X-Received: by 10.98.141.138 with SMTP id p10mr9621264pfk.111.1488384246961; Wed, 01 Mar 2017 08:04:06 -0800 (PST) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id d194si4967299pfd.78.2017.03.01.08.04.06; Wed, 01 Mar 2017 08:04:06 -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; 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 Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 4AFB87759B; Wed, 1 Mar 2017 16:03:06 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 7212477576 for ; Wed, 1 Mar 2017 16:02:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2pSA011995; Wed, 1 Mar 2017 16:02:52 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id C1fUm_0dxwqA; Wed, 1 Mar 2017 16:02:52 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2kax011981 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 1 Mar 2017 16:02:47 GMT Received: from richard by hex with local (Exim 4.86_2) (envelope-from ) id 1cj6iE-0004oK-Qg; Wed, 01 Mar 2017 16:02:46 +0000 From: Richard Purdie To: openembedded-core@lists.openembedded.org Date: Wed, 1 Mar 2017 16:02:40 +0000 Message-Id: <1488384162-18397-10-git-send-email-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> References: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> Subject: [OE-core] [PATCH 10/12] oeqa: add output to subprocess exceptions 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 From: Ross Burton Out of the box subprocess.CalledProcessError.__str__() just displays the command and exit code, which isn't very useful for debugging. Add a function to oeqa.utils.subprocesstweak to monkey-patch __str__() so that it can also display the value of stdout and stderr. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/oetest.py | 9 --------- meta/lib/oeqa/utils/subprocesstweak.py | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 meta/lib/oeqa/utils/subprocesstweak.py -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index a89bd11..1dad763 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -135,15 +135,6 @@ class oeRuntimeTest(oeTest): if status != 0: return status -class OETestCalledProcessError(subprocess.CalledProcessError): - def __str__(self): - if hasattr(self, "stderr"): - return "Command '%s' returned non-zero exit status %d with output %s and stderr %s" % (self.cmd, self.returncode, self.output, self.stderr) - else: - return "Command '%s' returned non-zero exit status %d with output %s" % (self.cmd, self.returncode, self.output) - -subprocess.CalledProcessError = OETestCalledProcessError - def getmodule(pos=2): # stack returns a list of tuples containg frame information # First element of the list the is current frame, caller is 1 diff --git a/meta/lib/oeqa/utils/subprocesstweak.py b/meta/lib/oeqa/utils/subprocesstweak.py new file mode 100644 index 0000000..1f7d11b --- /dev/null +++ b/meta/lib/oeqa/utils/subprocesstweak.py @@ -0,0 +1,19 @@ +import subprocess + +class OETestCalledProcessError(subprocess.CalledProcessError): + def __str__(self): + def strify(o): + if isinstance(o, bytes): + return o.decode("utf-8", errors="replace") + else: + return o + + s = "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) + if hasattr(self, "output") and self.output: + s = s + "\nStandard Output: " + strify(self.output) + if hasattr(self, "stderr") and self.stderr: + s = s + "\nStandard Error: " + strify(self.stderr) + return s + +def errors_have_output(): + subprocess.CalledProcessError = OETestCalledProcessError From patchwork Wed Mar 1 16:02:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 94714 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1865589qgi; Wed, 1 Mar 2017 08:03:49 -0800 (PST) X-Received: by 10.98.147.10 with SMTP id b10mr9452102pfe.177.1488384228943; Wed, 01 Mar 2017 08:03:48 -0800 (PST) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id r1si1269928pgn.215.2017.03.01.08.03.48; Wed, 01 Mar 2017 08:03:48 -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; 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 Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id A35EB77562; Wed, 1 Mar 2017 16:03:02 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id AA94F77552 for ; Wed, 1 Mar 2017 16:02:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2po9011997; Wed, 1 Mar 2017 16:02:51 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jpRsIhPgQRUG; Wed, 1 Mar 2017 16:02:51 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2k8o011982 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 1 Mar 2017 16:02:47 GMT Received: from richard by hex with local (Exim 4.86_2) (envelope-from ) id 1cj6iE-0004oP-RJ; Wed, 01 Mar 2017 16:02:46 +0000 From: Richard Purdie To: openembedded-core@lists.openembedded.org Date: Wed, 1 Mar 2017 16:02:41 +0000 Message-Id: <1488384162-18397-11-git-send-email-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> References: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> Subject: [OE-core] [PATCH 11/12] oeqa/sdkext/devtool: use finally instead of repeating 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 From: Ross Burton Use the finally: block to always to cleanup. Now that the test harness in testsdk.bbclass has monkey-patched CalledProcessException to display the output we don't need to do that in the test case. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/testsdk.bbclass | 4 +++- meta/lib/oeqa/sdkext/cases/devtool.py | 35 ++++++++++------------------------- 2 files changed, 13 insertions(+), 26 deletions(-) -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass index 802e57f..0e6949e 100644 --- a/meta/classes/testsdk.bbclass +++ b/meta/classes/testsdk.bbclass @@ -100,7 +100,7 @@ def testsdkext_main(d): import logging from bb.utils import export_proxies - from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible + from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor pn = d.getVar("PN") @@ -109,6 +109,8 @@ def testsdkext_main(d): # extensible sdk use network export_proxies(d) + subprocesstweak.errors_have_output() + # extensible sdk can be contaminated if native programs are # in PATH, i.e. use perl-native instead of eSDK one. paths_to_avoid = [d.getVar('STAGING_DIR'), diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index ffaa2f0..63431aa 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py @@ -29,38 +29,32 @@ class DevtoolTest(OESDKExtTestCase): self._run('devtool add myapp %s' % directory) try: self._run('devtool build myapp') - except Exception as e: - print(e.output) + finally: self._run('devtool reset myapp') - raise e - self._run('devtool reset myapp') def _test_devtool_build_package(self, directory): self._run('devtool add myapp %s' % directory) try: self._run('devtool package myapp') - except Exception as e: - print(e.output) + finally: self._run('devtool reset myapp') - raise e - self._run('devtool reset myapp') def test_devtool_location(self): output = self._run('which devtool') self.assertEqual(output.startswith(self.tc.sdk_dir), True, \ msg="Seems that devtool isn't the eSDK one: %s" % output) - + @OETestDepends(['test_devtool_location']) def test_devtool_add_reset(self): self._run('devtool add myapp %s' % self.myapp_dst) self._run('devtool reset myapp') - + @OETestID(1605) @OETestDepends(['test_devtool_location']) @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_devtool_build_make(self): self._test_devtool_build(self.myapp_dst) - + @OETestID(1606) @OETestDepends(['test_devtool_location']) @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') @@ -72,7 +66,7 @@ class DevtoolTest(OESDKExtTestCase): @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_devtool_build_cmake(self): self._test_devtool_build(self.myapp_cmake_dst) - + @OETestID(1608) @OETestDepends(['test_devtool_location']) @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') @@ -82,11 +76,8 @@ class DevtoolTest(OESDKExtTestCase): self._run('devtool add %s %s' % (recipe, req) ) try: self._run('devtool build %s' % recipe) - except Exception as e: - print(e.output) + finally: self._run('devtool reset %s' % recipe) - raise e - self._run('devtool reset %s' % recipe) @OETestID(1609) @OETestDepends(['test_devtool_location']) @@ -97,11 +88,8 @@ class DevtoolTest(OESDKExtTestCase): self._run('devtool add %s %s' % (recipe, docfile) ) try: self._run('devtool build %s' % recipe) - except Exception as e: - print(e.output) + finally: self._run('devtool reset %s' % recipe) - raise e - self._run('devtool reset %s' % recipe) @OETestID(1610) @OETestDepends(['test_devtool_location']) @@ -111,8 +99,5 @@ class DevtoolTest(OESDKExtTestCase): self._run('devtool add %s ' % package_nodejs) try: self._run('devtool build %s ' % package_nodejs) - except Exception as e: - print(e.output) - self._run('devtool reset %s' % package_nodejs) - raise e - self._run('devtool reset %s '% package_nodejs) + finally: + self._run('devtool reset %s '% package_nodejs) From patchwork Wed Mar 1 16:02:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 94717 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1865860qgi; Wed, 1 Mar 2017 08:04:15 -0800 (PST) X-Received: by 10.84.225.150 with SMTP id u22mr11116545plj.91.1488384254951; Wed, 01 Mar 2017 08:04:14 -0800 (PST) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id a1si4932815pgf.369.2017.03.01.08.04.14; Wed, 01 Mar 2017 08:04:14 -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; 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 Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 37DD5775A5; Wed, 1 Mar 2017 16:03:07 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 3202877562 for ; Wed, 1 Mar 2017 16:02:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2poA011997; Wed, 1 Mar 2017 16:02:51 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LWFEQvhqttJQ; Wed, 1 Mar 2017 16:02:51 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v21G2kYO011983 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 1 Mar 2017 16:02:47 GMT Received: from richard by hex with local (Exim 4.86_2) (envelope-from ) id 1cj6iE-0004oU-Ry; Wed, 01 Mar 2017 16:02:46 +0000 From: Richard Purdie To: openembedded-core@lists.openembedded.org Date: Wed, 1 Mar 2017 16:02:42 +0000 Message-Id: <1488384162-18397-12-git-send-email-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> References: <1488384162-18397-1-git-send-email-richard.purdie@linuxfoundation.org> Subject: [OE-core] [PATCH 12/12] oeqa/sdkext: don't skip tests if there isn't a toolchain 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 From: Ross Burton Skipping the tests if a toolchain wasn't installed out of the box (for example, a minimal eSDK) doesn't make sense as the first thing the tests should do is install a toolchain. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/sdkext/cases/devtool.py | 7 ------- 1 file changed, 7 deletions(-) -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index 63431aa..1072fb6 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py @@ -7,7 +7,6 @@ import subprocess from oeqa.sdkext.case import OESDKExtTestCase from oeqa.core.decorator.depends import OETestDepends from oeqa.core.decorator.oeid import OETestID -from oeqa.core.decorator.data import skipIfNotDataVar class DevtoolTest(OESDKExtTestCase): @classmethod @@ -51,25 +50,21 @@ class DevtoolTest(OESDKExtTestCase): @OETestID(1605) @OETestDepends(['test_devtool_location']) - @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_devtool_build_make(self): self._test_devtool_build(self.myapp_dst) @OETestID(1606) @OETestDepends(['test_devtool_location']) - @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_devtool_build_esdk_package(self): self._test_devtool_build_package(self.myapp_dst) @OETestID(1607) @OETestDepends(['test_devtool_location']) - @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_devtool_build_cmake(self): self._test_devtool_build(self.myapp_cmake_dst) @OETestID(1608) @OETestDepends(['test_devtool_location']) - @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_extend_autotools_recipe_creation(self): req = 'https://github.com/rdfa/librdfa' recipe = "librdfa" @@ -81,7 +76,6 @@ class DevtoolTest(OESDKExtTestCase): @OETestID(1609) @OETestDepends(['test_devtool_location']) - @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_devtool_kernelmodule(self): docfile = 'https://github.com/umlaeute/v4l2loopback.git' recipe = 'v4l2loopback-driver' @@ -93,7 +87,6 @@ class DevtoolTest(OESDKExtTestCase): @OETestID(1610) @OETestDepends(['test_devtool_location']) - @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') def test_recipes_for_nodejs(self): package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0" self._run('devtool add %s ' % package_nodejs)