diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-30 00:35:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-30 00:37:16 +0000 |
commit | 87b237512f0c8593ee09ac91ef2ba25500eb36ee (patch) | |
tree | 50de287df0bf5bdf80e8f5286b73c68c561c23d1 /meta/lib | |
parent | 6ce42d73a31bf9b2fc362fa4acad11de97ac96ec (diff) | |
download | poky-87b237512f0c8593ee09ac91ef2ba25500eb36ee.tar.gz |
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>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/sstatetests.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index f827615ba1..9eecb4381b 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py | |||
@@ -263,7 +263,7 @@ class SStateDistroTests(SStateBase): | |||
263 | 263 | ||
264 | class SStateCacheManagement(SStateBase): | 264 | class SStateCacheManagement(SStateBase): |
265 | # Test the sstate-cache-management script. Each element in the global_config list is used with the corresponding element in the target_config list | 265 | # Test the sstate-cache-management script. Each element in the global_config list is used with the corresponding element in the target_config list |
266 | # 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) | 266 | # 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) |
267 | def run_test_sstate_cache_management_script(self, target, global_config=[''], target_config=[''], ignore_patterns=[]): | 267 | def run_test_sstate_cache_management_script(self, target, global_config=[''], target_config=[''], ignore_patterns=[]): |
268 | self.assertTrue(global_config) | 268 | self.assertTrue(global_config) |
269 | self.assertTrue(target_config) | 269 | self.assertTrue(target_config) |
@@ -277,14 +277,10 @@ class SStateCacheManagement(SStateBase): | |||
277 | # For now this only checks if random sstate tasks are handled correctly as a group. | 277 | # For now this only checks if random sstate tasks are handled correctly as a group. |
278 | # In the future we should add control over what tasks we check for. | 278 | # In the future we should add control over what tasks we check for. |
279 | 279 | ||
280 | sstate_archs_list = [] | ||
281 | expected_remaining_sstate = [] | 280 | expected_remaining_sstate = [] |
282 | for idx in range(len(target_config)): | 281 | for idx in range(len(target_config)): |
283 | self.append_config(global_config[idx]) | 282 | self.append_config(global_config[idx]) |
284 | self.append_recipeinc(target, target_config[idx]) | 283 | self.append_recipeinc(target, target_config[idx]) |
285 | sstate_arch = get_bb_var('SSTATE_PKGARCH', target) | ||
286 | if not sstate_arch in sstate_archs_list: | ||
287 | sstate_archs_list.append(sstate_arch) | ||
288 | if target_config[idx] == target_config[-1]: | 284 | if target_config[idx] == target_config[-1]: |
289 | target_sstate_before_build = self.search_sstate(target + r'.*?\.tar.zst$') | 285 | target_sstate_before_build = self.search_sstate(target + r'.*?\.tar.zst$') |
290 | bitbake("-cclean %s" % target) | 286 | bitbake("-cclean %s" % target) |
@@ -296,7 +292,7 @@ class SStateCacheManagement(SStateBase): | |||
296 | self.remove_recipeinc(target, target_config[idx]) | 292 | self.remove_recipeinc(target, target_config[idx]) |
297 | self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output)) | 293 | self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output)) |
298 | 294 | ||
299 | runCmd("sstate-cache-management.sh -y --cache-dir=%s --remove-duplicated --extra-archs=%s" % (self.sstate_path, ','.join(map(str, sstate_archs_list)))) | 295 | runCmd("sstate-cache-management.py -y --cache-dir=%s --remove-duplicated" % (self.sstate_path)) |
300 | 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)] | 296 | 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)] |
301 | 297 | ||
302 | actual_not_expected = [x for x in actual_remaining_sstate if x not in expected_remaining_sstate] | 298 | actual_not_expected = [x for x in actual_remaining_sstate if x not in expected_remaining_sstate] |