From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/3] oeqa/selftest/esdk: run selftest inside workdir not /tmp
Date: Mon, 3 Dec 2018 20:35:15 +0000 [thread overview]
Message-ID: <20181203203516.26461-2-ross.burton@intel.com> (raw)
In-Reply-To: <20181203203516.26461-1-ross.burton@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/lib/oeqa/selftest/cases/eSDK.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py
index d03188f2f75..14f75d8c09a 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):
--
2.11.0
next prev parent reply other threads:[~2018-12-03 20:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 20:35 [PATCH 1/3] oeqa: don't litter /tmp with temporary directories Ross Burton
2018-12-03 20:35 ` Ross Burton [this message]
2018-12-03 20:35 ` [PATCH 3/3] insane: clarify GNU_HASH warning Ross Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181203203516.26461-2-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox