summaryrefslogtreecommitdiffstats
path: root/meta
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-16 14:31:33 +0000
commit510e6e2143c86deda8ad88d451e234e18e08811f (patch)
treee81a34278a93eb51213a2577a1266c9defc842b6 /meta
parent29361d7aeb94be9234dcece8ed19fd2bfc3e53cd (diff)
downloadpoky-510e6e2143c86deda8ad88d451e234e18e08811f.tar.gz
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. (From OE-Core rev: 61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0) (From OE-Core rev: 63eefbe21612e58e88f1eb3fde3d314da53927fa) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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"
70 @classmethod 70 @classmethod
71 def setUpClass(cls): 71 def setUpClass(cls):
72 super(oeSDKExtSelfTest, cls).setUpClass() 72 super(oeSDKExtSelfTest, cls).setUpClass()
73 cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA') 73 cls.image = 'core-image-minimal'
74 74
75 sstate_dir = get_bb_var('SSTATE_DIR') 75 bb_vars = get_bb_vars(['SSTATE_DIR', 'WORKDIR'], cls.image)
76 cls.tmpdirobj = tempfile.TemporaryDirectory(prefix="selftest-esdk-", dir=bb_vars["WORKDIR"])
77 cls.tmpdir_eSDKQA = cls.tempdirobj.name
76 78
77 cls.image = 'core-image-minimal'
78 oeSDKExtSelfTest.generate_eSDK(cls.image) 79 oeSDKExtSelfTest.generate_eSDK(cls.image)
79 80
80 # Install eSDK 81 # Install eSDK
@@ -87,14 +88,14 @@ CORE_IMAGE_EXTRA_INSTALL = "perl"
87 sstate_config=""" 88 sstate_config="""
88SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" 89SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
89SSTATE_MIRRORS = "file://.* file://%s/PATH" 90SSTATE_MIRRORS = "file://.* file://%s/PATH"
90 """ % sstate_dir 91 """ % bb_vars["SSTATE_DIR"]
91 with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: 92 with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f:
92 f.write(sstate_config) 93 f.write(sstate_config)
93 94
94 @classmethod 95 @classmethod
95 def tearDownClass(cls): 96 def tearDownClass(cls):
96 shutil.rmtree(cls.tmpdir_eSDKQA, ignore_errors=True) 97 cls.tmpdirobj.cleanup()
97 super(oeSDKExtSelfTest, cls).tearDownClass() 98 super().tearDownClass()
98 99
99 @OETestID(1602) 100 @OETestID(1602)
100 def test_install_libraries_headers(self): 101 def test_install_libraries_headers(self):