mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
oeqa/selftest/sstatetests: Update sstate management script tests to python script
Now we've switched to the python script, update the tests to match that by removing the now unneeded parameter. (From OE-Core rev: 93989f9b4895506e6ad66a78088a5c2801e2a10d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -263,7 +263,7 @@ class SStateDistroTests(SStateBase):
|
|||||||
|
|
||||||
class SStateCacheManagement(SStateBase):
|
class SStateCacheManagement(SStateBase):
|
||||||
# Test the sstate-cache-management script. Each element in the global_config list is used with the corresponding element in the target_config list
|
# Test the sstate-cache-management script. Each element in the global_config list is used with the corresponding element in the target_config list
|
||||||
# global_config elements are expected to not generate any sstate files that would be removed by sstate-cache-management.sh (such as changing the value of MACHINE)
|
# global_config elements are expected to not generate any sstate files that would be removed by sstate-cache-management.py (such as changing the value of MACHINE)
|
||||||
def run_test_sstate_cache_management_script(self, target, global_config=[''], target_config=[''], ignore_patterns=[]):
|
def run_test_sstate_cache_management_script(self, target, global_config=[''], target_config=[''], ignore_patterns=[]):
|
||||||
self.assertTrue(global_config)
|
self.assertTrue(global_config)
|
||||||
self.assertTrue(target_config)
|
self.assertTrue(target_config)
|
||||||
@@ -277,14 +277,10 @@ class SStateCacheManagement(SStateBase):
|
|||||||
# For now this only checks if random sstate tasks are handled correctly as a group.
|
# For now this only checks if random sstate tasks are handled correctly as a group.
|
||||||
# In the future we should add control over what tasks we check for.
|
# In the future we should add control over what tasks we check for.
|
||||||
|
|
||||||
sstate_archs_list = []
|
|
||||||
expected_remaining_sstate = []
|
expected_remaining_sstate = []
|
||||||
for idx in range(len(target_config)):
|
for idx in range(len(target_config)):
|
||||||
self.append_config(global_config[idx])
|
self.append_config(global_config[idx])
|
||||||
self.append_recipeinc(target, target_config[idx])
|
self.append_recipeinc(target, target_config[idx])
|
||||||
sstate_arch = get_bb_var('SSTATE_PKGARCH', target)
|
|
||||||
if not sstate_arch in sstate_archs_list:
|
|
||||||
sstate_archs_list.append(sstate_arch)
|
|
||||||
if target_config[idx] == target_config[-1]:
|
if target_config[idx] == target_config[-1]:
|
||||||
target_sstate_before_build = self.search_sstate(target + r'.*?\.tar.zst$')
|
target_sstate_before_build = self.search_sstate(target + r'.*?\.tar.zst$')
|
||||||
bitbake("-cclean %s" % target)
|
bitbake("-cclean %s" % target)
|
||||||
@@ -296,7 +292,7 @@ class SStateCacheManagement(SStateBase):
|
|||||||
self.remove_recipeinc(target, target_config[idx])
|
self.remove_recipeinc(target, target_config[idx])
|
||||||
self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output))
|
self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output))
|
||||||
|
|
||||||
runCmd("sstate-cache-management.sh -y --cache-dir=%s --remove-duplicated --extra-archs=%s" % (self.sstate_path, ','.join(map(str, sstate_archs_list))))
|
runCmd("sstate-cache-management.py -y --cache-dir=%s --remove-duplicated" % (self.sstate_path))
|
||||||
actual_remaining_sstate = [x for x in self.search_sstate(target + r'.*?\.tar.zst$') if not any(pattern in x for pattern in ignore_patterns)]
|
actual_remaining_sstate = [x for x in self.search_sstate(target + r'.*?\.tar.zst$') if not any(pattern in x for pattern in ignore_patterns)]
|
||||||
|
|
||||||
actual_not_expected = [x for x in actual_remaining_sstate if x not in expected_remaining_sstate]
|
actual_not_expected = [x for x in actual_remaining_sstate if x not in expected_remaining_sstate]
|
||||||
|
|||||||
Reference in New Issue
Block a user