From patchwork Thu Dec 13 21:38:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Kuster X-Patchwork-Id: 153700 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1322459ljp; Thu, 13 Dec 2018 13:41:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/XnuLF3wtLIn8A16LP0Y5LbYvkfshWdm0keb3DeNLrQxWFPduq87EalQg7+obYhoTW2l5f+ X-Received: by 2002:a65:560e:: with SMTP id l14mr430578pgs.168.1544737263306; Thu, 13 Dec 2018 13:41:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544737263; cv=none; d=google.com; s=arc-20160816; b=bP0KtQMLXSoE0nEYWRfBCJ8G48FYfGgo6DsQbDK89uALxue2rxLWLl2+sySYqNtR9j 33B1kVJYQPk6LRHHPD5kOWVQsyrxzBcuML+lvIoRs5emAFD3yaZUD5nfD/CmTz4x8CZa JJMc/SWIhHEOKTmPAyt6z/cQhu2I1QmA+WoW5wBJfLurgZNXsrhVmEcufc9rZeFDYcFk EJ6yOl9wLqvr+56vuX+WnTWnkB0g/8UMQQlsVoQU9LotA/Y4Yrc10/mZfeOL1RiuASpo 5YB78IJYrfG2ak9TxekmXbK8mRGi/0bhoQF9A1nJU++eKwqeg8klNiW6tX5OkpS9apcy Yb4Q== 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=3yhmbNPgQUKZRBlZztvw2oGgSG+GeHg9jpAZOEkQkuo=; b=x9f36F2cXktF1ff1ju5dAGurpACJaj1isHL4ywzAZXvZh+roRCkf72zGWgAJCbp6kc 09Il0leitgGSR24ETUxX01689gtqyI9wioWNdFps7R786hM97WPulDVdkQ6WmvVV4bz8 j5+g7zgOUvhkV0eIs/8PnN0nLBd0IUW14xCDgfyzu4eVvUc+NETxiFxnUZxRBuflFo/j taruD62sreZ9Aj/QreVpbX17wiLqghlE2O2HcC0+ALPyTZCpugIwgOXrn83FI552AxXh wSUSv6unfth1pgYk4DlBRqZhyJZquB4jH/I1OpY6TYead7yuVDpd6GRToP8jIx8PK7JV WjBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=gkz7PTcn; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id u69si2550567pfj.219.2018.12.13.13.41.03; Thu, 13 Dec 2018 13:41:03 -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=@gmail.com header.s=20161025 header.b=gkz7PTcn; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B1A6579DC0; Thu, 13 Dec 2018 21:39:39 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by mail.openembedded.org (Postfix) with ESMTP id 593DE746BB for ; Thu, 13 Dec 2018 21:39:17 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id e5so1671949plb.5 for ; Thu, 13 Dec 2018 13:39:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=hosjN0YKlKRRF9ubLk+ggaxWNhBm16aEBPM7vRSArcA=; b=gkz7PTcnOhMflJxggxSvBUG4lOtD2QLMHpifh7br2rYPFuQ42VBRJnHOXe1o7HwdvJ 7zarDiHOzHh9V5ZpoXBkqOyLycliVLha4JpQHow+6sbyHqLrzKS6gpkxbFbK9bqraKKI UEz17lwGLBt3lD2PZbwrTp68uZYg5lF0BNQQHVVbz1plHUxH5ud2ujIHzoaH5bKt5dBD pXi5lCy8WBuyjjwSXldA927nMDUJHAEbFZSUPV2e7qZA2i4iSI2eYdnJQt8F3J4LIJCs 43IwEsQ4IqKC2F15VOf9KgHepFQdPj1F+YFreck/SP1pu7qHayi5w7dEtqvNrz2BKbqg F4AQ== 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=hosjN0YKlKRRF9ubLk+ggaxWNhBm16aEBPM7vRSArcA=; b=DN6IFwRKrlv20qgNDRJdysEUydL5HnvefuCAe0TQJGHQUTR4jV02rKjGCRyHO76Rbm jU3Mn5RfjHS/pItm2rJYtPLOBEnWxzSIyr4s/i+/SmWitDMHiop7+HNWfOc8lSchK7md NxHC8JgwjHduvUlNlpY4/D1MlKDUscpDOuNDPAg9KKZdZCzOZGcSaUS39YJ4Z/Xsgsoy rt+XYxFmvdTSQC0zN98xQmreUIEAo8g44nj7k+DBvasUhusmf9dXdX7HfGaUNu8AfUrW zHW/oYVpBksEswBendmzRTBuzXlmCgNeL8G4dm0Sdtp8WqdGuFx1HvmiCQrAbEK9+Y8X BV1g== X-Gm-Message-State: AA+aEWaeixlWI4DQQ36jC8sjQIZPZUwnMbjmVw2No9RIv98gUd0mNNhP Vxmugm8fujKGgSA/ozPdOYKlIbxb X-Received: by 2002:a17:902:b943:: with SMTP id h3mr479495pls.12.1544737158428; Thu, 13 Dec 2018 13:39:18 -0800 (PST) Received: from akuster-ThinkPad-T460s.hsd1.ca.comcast.net ([2601:202:4180:c33:79af:1f36:1822:3801]) by smtp.gmail.com with ESMTPSA id b9sm3288912pfi.118.2018.12.13.13.39.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Dec 2018 13:39:17 -0800 (PST) From: Armin Kuster To: openembedded-core@lists.openembedded.org, akuster808@gmail.com Date: Thu, 13 Dec 2018 13:38:23 -0800 Message-Id: <31370a26389ff70c879f13ef314627a7d8efc6c4.1544735897.git.akuster808@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Subject: [OE-core] [PATCH 15/45] oeqa/oelib/path: don't leak temporary directories 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 setUp() is used to populate a directory of temporary files, and deleted in __del__. However setUp() is called once *per test* so __del__ would only be able to remove the last directory created. Fix the code by using the natural counterpart to setUp, tearDown(), to clean up. (From OE-Core rev: 68b4723e6fb11d171869185bccf28f32f6284c18) (From OE-Core rev: edd2ecbc86d8b02a0467491451306f67e81d9ead) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/oelib/path.py | 10 +++------- 1 file changed, 3 insertions(+), 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/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py index 75a27c0..e0eb813 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/path.py +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py @@ -38,13 +38,6 @@ class TestRealPath(TestCase): ( "b/test", errno.ENOENT ), ] - def __del__(self): - try: - #os.system("tree -F %s" % self.tmpdir) - shutil.rmtree(self.tmpdir) - except: - pass - def setUp(self): self.tmpdir = tempfile.mkdtemp(prefix = "oe-test_path") self.root = os.path.join(self.tmpdir, "R") @@ -59,6 +52,9 @@ class TestRealPath(TestCase): for l in self.LINKS: os.symlink(l[1], os.path.join(self.root, l[0])) + def tearDown(self): + shutil.rmtree(self.tmpdir) + def __realpath(self, file, use_physdir, assume_dir = True): return oe.path.realpath(os.path.join(self.root, file), self.root, use_physdir, assume_dir = assume_dir) From patchwork Thu Dec 13 21:38:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Kuster X-Patchwork-Id: 153701 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1322791ljp; Thu, 13 Dec 2018 13:41:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/WPdHOesi/N+PvaSQp3IVWiS8VkDmRI5fDkIlt/HBbGm38vad8esXgarXihF96P7xHo25yg X-Received: by 2002:a63:e302:: with SMTP id f2mr425692pgh.320.1544737284410; Thu, 13 Dec 2018 13:41:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544737284; cv=none; d=google.com; s=arc-20160816; b=HR6drWpGxQ5p8psmAQi2Wxca7dMWSY0Ahne4Un592P3zK5ltiAarO7OWWPXVQqhoDK nBd1dg4ZiSba3bbepXcbVpfh5miE/Vbw3GzDfOc9LjN2VJESuxtPj6a2kpDMx4tGSuQm cQRU9dikvkEoTChOlXUYgVQ6arBkCA0vqPeo8rknT607BVCiDRfIB0wpsHv3thO/nSrv WSam+9i1Jeq4yaaCNcbzejHolKf3Vk88UJ5C5/horXnZ1NcC1OU09cwPxPERViNb5ePj IwwAPB7CTTDlgoaHyb36ynIOTfa6AErW94Wzkl5t/rckU3ibLXsDlRv3kD35ksX/fu9n yd3g== 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=cMnVzdJWr8lBrdHrGe8JHx/Eq4RndZzN6eBNchy4nO0=; b=T7H31HLdHal87aySJFRny8X3LEG6kYD+w4d1z2b3zB+gjU7j4/jvN+frfSO5t2GV/W T0GXq/HwmkndW+qaO1l0OH0nZO3yIJaSpHRJ+XW7ALIqjhgi2Abkot5apgoAK7a2bxr1 2jp2e0KNL4oY6Mw46PgnOqR/0O0XpUlBc2Km2GImVODoWz1CkpbJSOqIgoHGlLnj5QFu XO6Y+qwY9LdE2x5h0KUS8X6BofjtVpKHo8h8r4DbHOeSkkTMva5nVUZJoRFNhao8vQO/ obDysyPZxkwHJMN9jSR7By1dl0j7BHTV3JgJxp+5Se8zBVb7zoVzE/ExAQQGqL9rtlcx rSQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=TziNw+Yx; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id i1si2360388pgi.480.2018.12.13.13.41.24; Thu, 13 Dec 2018 13:41:24 -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=@gmail.com header.s=20161025 header.b=TziNw+Yx; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 6A03079E2C; Thu, 13 Dec 2018 21:39:43 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by mail.openembedded.org (Postfix) with ESMTP id 975CB6D576 for ; Thu, 13 Dec 2018 21:39:21 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id y1so1657139plp.9 for ; Thu, 13 Dec 2018 13:39:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=K/5bKjVnKlCTqXuMV4c83POTaRjsiWK3hZnwUOH6U7g=; b=TziNw+Yxgvah4gunt26OcttQj49H9FfM9jbEAU+4p9R3HNPpPdk+ceJG2z1gCQE28a 8u4vrCvCF+beUJVp4qGf2AMEQkjo1tgurpq/ekeBS9tPSyoLDRIn7IHwQhr7OsNxZGgU eUpU4Kbt/5QRrRbGM6eWuFdNXjz/4gKP5GBPNQms0Z93bbBTMAO3EBXJvfVYpft52ehH XEWe2Aw0FJD9lVKc5kjt1ozssS5Egp4SVMhP0INSHM0ms2qdcnp+2sFrZQAjMrhMFRrN KoRV6KY4UIk1Ru+4R7KLlvt1TggghiDK6ypwKPhDQCygrjUvsj8Nq5XgA/NJrmYnkk3Q gddw== 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=K/5bKjVnKlCTqXuMV4c83POTaRjsiWK3hZnwUOH6U7g=; b=m43oM0/yBJi8coBNngpiYEFf5dj8iwsId7CjDkVVZAU/DZ0b2WXo2/ILu0c0NYsl1K 7e0R8BdX6T5UBxPgK8zJQ6eK4OWYVd8DWaZbxhXyvQlb1GXh2B4LzCCb/imUzAlDw+0v a6qGl1EW1GVydRLa1IzG+fDmcyHhO+6Br2MHIK0ZpPqizlfpLgfB/CtW8iQm2tdz0FLl jm6gzF5z0tOOB9ZXLC80JCOlnJVOVChIL8aWWwthtciCI9P6VirSfhowgjJvwy33JNJz 7ZENIIr/+mnYuBcXSolxyeIv7VDzeuj7hxJubS6RILOMCGR06OvH1EMrf+c1WrE1wW9N GkwA== X-Gm-Message-State: AA+aEWb2hauWg6osSQxsd+T9in/2Yozik2C/e4gpEyao3fd/8/tgiCuN T+VsnmOHgTb9nNFGqN7bd5TxyarL X-Received: by 2002:a17:902:784d:: with SMTP id e13mr462463pln.188.1544737162493; Thu, 13 Dec 2018 13:39:22 -0800 (PST) Received: from akuster-ThinkPad-T460s.hsd1.ca.comcast.net ([2601:202:4180:c33:79af:1f36:1822:3801]) by smtp.gmail.com with ESMTPSA id b9sm3288912pfi.118.2018.12.13.13.39.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Dec 2018 13:39:21 -0800 (PST) From: Armin Kuster To: openembedded-core@lists.openembedded.org, akuster808@gmail.com Date: Thu, 13 Dec 2018 13:38:26 -0800 Message-Id: <0ed89f2d5860bfdcea61796de17f152f0b37fc8f.1544735897.git.akuster808@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Subject: [OE-core] [PATCH 18/45] oeqa: don't litter /tmp with temporary directories 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 If we need to create a temporary directory in targetbuild or buildproject use tempfile.TemporaryDirectory so that when the test case is finished, the directory is deleted. Also synchronise the logic and don't possibly store the temporary directory in self.tmpdir as nothing uses that. (From OE-Core rev: db0e658097130d146752785d0d45f46a3e0bad71) (From OE-Core rev: d39252324a13580cc96f0694b88bc10515e030a0) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/buildproject.py | 3 ++- meta/lib/oeqa/utils/targetbuild.py | 5 +++-- 2 files changed, 5 insertions(+), 3 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/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py index 721f35d..88e7b7f 100644 --- a/meta/lib/oeqa/utils/buildproject.py +++ b/meta/lib/oeqa/utils/buildproject.py @@ -17,7 +17,8 @@ class BuildProject(metaclass=ABCMeta): self.uri = uri self.archive = os.path.basename(uri) if not tmpdir: - tmpdir = tempfile.mkdtemp(prefix='buildproject') + self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-') + tmpdir = self.tempdirobj.name self.localarchive = os.path.join(tmpdir, self.archive) self.dl_dir = dl_dir if foldername: diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py index 1202d57..b8db7b2 100644 --- a/meta/lib/oeqa/utils/targetbuild.py +++ b/meta/lib/oeqa/utils/targetbuild.py @@ -20,8 +20,9 @@ class BuildProject(metaclass=ABCMeta): if not tmpdir: tmpdir = self.d.getVar('WORKDIR') if not tmpdir: - tmpdir = tempfile.mkdtemp(prefix='buildproject') - self.localarchive = os.path.join(tmpdir,self.archive) + self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-') + tmpdir = self.tempdirobj.name + self.localarchive = os.path.join(tmpdir, self.archive) if foldername: self.fname = foldername else: From patchwork Thu Dec 13 21:38:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Kuster X-Patchwork-Id: 153702 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1322874ljp; Thu, 13 Dec 2018 13:41:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/VEB6SatgzbJEDHQDFoO3JWlVoWxEeLKov0a3LrqVKX7ZvKQGNH45mf8O4Fnyx2z1yUe0aI X-Received: by 2002:a17:902:bd4a:: with SMTP id b10mr454444plx.232.1544737291051; Thu, 13 Dec 2018 13:41:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544737291; cv=none; d=google.com; s=arc-20160816; b=uOWaWgF9SUKcpZ6sYsZ5bSVpRlr3zQJ44vPbZ7z0pZLZcL4ND5qUaVZtUEQXdjk2xN PntGjHQzBXKD3W0/ac1bm5P23oR2E1ZH/ZKNBC6fz1xngqVQUk/fnuYPta/GtwaNzheK nwreA8vvvCIp8Cqbv4xXtwUFIgE2ImL3h8q5FtexCaXVp5MSzyM/TpGJji0sSxX6uJEv B5JxF4tMNQvQvL2JnUpZvOHWpSsr8P63qEy1LH9vXv2UcTfyfTGkFhyfIUNR6J1bfXTL RvbqWNI83N8O7+iBp2BOpbwuTebOEyFP8zga67avVjYFvQfApYno5cF4NcHfdcDCF59C Fp3w== 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=EzD8vxUYfTPLsdrm4S7xVVRlJr55cOHgvM9MphqIGNI=; b=V6bP39i//u7mCJD2/362XBOgHFPhkWritfWGDinCg/hTS+f2cLh4Wk77KLxSqoYHs5 gFpevZebmtMfJNavHc9tqxJc1veHcxO8QxJHtvbRKIFa6Hrd+1GRVmHssBqi8/tr6zSc pynIuKBXDNWe+Q+D9sMN1VcfCHUgxsIxMkLlwKNuTcSI084BVkpoKCPrRr8T+DGErCvw PrUz2tSXqFqdkoB2woYG/HJjtVLuLzXrvYWUi1SankuoEZL5IEKkU+6iJFEiDNmPhSb1 QqP42lJw211qjLyKp+AqMDRDf/xS6Lx/F77nc9xExuKaR+ay91v/Mq7DeVZE519WS8WW 4ejA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=nEjLsgDJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id m187si2536985pfm.51.2018.12.13.13.41.30; Thu, 13 Dec 2018 13:41:31 -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=@gmail.com header.s=20161025 header.b=nEjLsgDJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 95BC179E08; Thu, 13 Dec 2018 21:39:44 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by mail.openembedded.org (Postfix) with ESMTP id A6EA27469B for ; Thu, 13 Dec 2018 21:39:22 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id w7so1635118pgp.13 for ; Thu, 13 Dec 2018 13:39:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=KN0e0+ZcJM0nXTKJ2qSpLtVlLOSxyrQkuZqrsOWsJmw=; b=nEjLsgDJ9mtGqtayULk2Rcd6OgkMUZOlQJv45eF6YrAjppPvM4RB77IQjEidbyM2Ji NBdlHKuPZS67dCaAq8KHGWEbD2DAZ/tmKni91Z55e5G89bWjywbBswifJnQLOVeKOHb7 gNK0eo45E9k0gvpsN3qT8PXJSI+u4DX1ShqmfCrSFzg11TlmAVFC5+yXEFeUoG2LE668 TYyq/ehIloWpG4aVWulX7uzDL1kntFQ4pCUobSawXdrext1XKxliRnCHp06zol5Ghtum 0Y1p6EkREc4CFBFezQMn5lI54qZPkdwP/TSHfP5gTkIoiw5rVHqxx2bcDaG5V1LGnJtN u93A== 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=KN0e0+ZcJM0nXTKJ2qSpLtVlLOSxyrQkuZqrsOWsJmw=; b=VYvnRBBBDKNH4CczDPHsW7rEwHqRmtL5RhF3ZhUhANjojqF6d+Mw5+HMfLBaUXJyqx m0Hi3J7LR8ahYowKRZXDOUNLUw6RJCyx+qQKdlNV0TZs0B3eYGFNDMndKTBZTxfiAPtj 7xTeTo/F9sgK8ZpzoIwEXMwPyUBD3uw2JMyosHJuuxYeNUE5fbaIauJS/b9KkUTEjXRy BoZt6GRR+AGwz7beMeOVWq2lVpkhOb8s7MDmTnKtQVH/V6UBkqDv7YQVoghIus8al8CZ Y2XiU3OHpn2xDoC+AKQdPhIBaDT6W0RVAQouQbl7+ZVxaqB0urqXPIwPTQabpmzFlGDs a/xQ== X-Gm-Message-State: AA+aEWZSmj95LBW2Evt+yiNqhBJmrpzffXPiGj0DmBLCpPBr8KJACGRM JT717v1/SEg8L2wmsFgjnylu+y6Y X-Received: by 2002:a63:4c04:: with SMTP id z4mr425962pga.312.1544737163613; Thu, 13 Dec 2018 13:39:23 -0800 (PST) Received: from akuster-ThinkPad-T460s.hsd1.ca.comcast.net ([2601:202:4180:c33:79af:1f36:1822:3801]) by smtp.gmail.com with ESMTPSA id b9sm3288912pfi.118.2018.12.13.13.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Dec 2018 13:39:22 -0800 (PST) From: Armin Kuster To: openembedded-core@lists.openembedded.org, akuster808@gmail.com Date: Thu, 13 Dec 2018 13:38:27 -0800 Message-Id: <236cd6c0c289dca77905aec1ff7be5c0c39a087d.1544735897.git.akuster808@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Subject: [OE-core] [PATCH 19/45] oeqa/selftest/esdk: run selftest inside workdir not /tmp 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 We've seen issues with rootfs size calculations and we've seen systems like opensuse which have btrfs mounted on /tmp causing selftest failures. (From OE-Core rev: 61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0) (From OE-Core rev: d936faabfb29ea377d74e77332a2a91603747ac7) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/eSDK.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py index d03188f..14f75d8 100644 --- a/meta/lib/oeqa/selftest/cases/eSDK.py +++ b/meta/lib/oeqa/selftest/cases/eSDK.py @@ -70,11 +70,12 @@ CORE_IMAGE_EXTRA_INSTALL = "perl" @classmethod def setUpClass(cls): super(oeSDKExtSelfTest, cls).setUpClass() - cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA') + cls.image = 'core-image-minimal' - sstate_dir = get_bb_var('SSTATE_DIR') + bb_vars = get_bb_vars(['SSTATE_DIR', 'WORKDIR'], cls.image) + cls.tmpdirobj = tempfile.TemporaryDirectory(prefix="selftest-esdk-", dir=bb_vars["WORKDIR"]) + cls.tmpdir_eSDKQA = cls.tempdirobj.name - cls.image = 'core-image-minimal' oeSDKExtSelfTest.generate_eSDK(cls.image) # Install eSDK @@ -87,14 +88,14 @@ CORE_IMAGE_EXTRA_INSTALL = "perl" sstate_config=""" SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" SSTATE_MIRRORS = "file://.* file://%s/PATH" - """ % sstate_dir + """ % bb_vars["SSTATE_DIR"] with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: f.write(sstate_config) @classmethod def tearDownClass(cls): - shutil.rmtree(cls.tmpdir_eSDKQA, ignore_errors=True) - super(oeSDKExtSelfTest, cls).tearDownClass() + cls.tmpdirobj.cleanup() + super().tearDownClass() @OETestID(1602) def test_install_libraries_headers(self):