summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-12-03 20:35:15 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-05 12:34:06 +0000
commit61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0 (patch)
tree1fb883e256137cab80254b6083b3b26f0717294d /meta/lib
parentdb0e658097130d146752785d0d45f46a3e0bad71 (diff)
downloadopenembedded-core-contrib-61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0.tar.gz
openembedded-core-contrib-61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0.tar.bz2
openembedded-core-contrib-61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0.zip
oeqa/selftest/esdk: run selftest inside workdir not /tmp
We've seen issues with rootfs size calculations and we've seen systems like opensuse which have btrfs mounted on /tmp causing selftest failures. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/eSDK.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py
index d03188f2f7..14f75d8c09 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):