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)