summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):