diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/sstatetests.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/sstatetests.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 874f439282..3dab607eeb 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py | |||
@@ -68,7 +68,7 @@ class SStateTests(SStateBase): | |||
68 | results = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific) | 68 | results = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific) |
69 | if distro_nonspecific: | 69 | if distro_nonspecific: |
70 | for r in results: | 70 | for r in results: |
71 | if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo", "_fetch.tgz.siginfo", "_unpack.tgz.siginfo", "_patch.tgz.siginfo")): | 71 | if r.endswith(("_populate_lic.tar.zst", "_populate_lic.tar.zst.siginfo", "_fetch.tar.zst.siginfo", "_unpack.tar.zst.siginfo", "_patch.tar.zst.siginfo")): |
72 | continue | 72 | continue |
73 | file_tracker.append(r) | 73 | file_tracker.append(r) |
74 | else: | 74 | else: |
@@ -98,15 +98,15 @@ class SStateTests(SStateBase): | |||
98 | bitbake(['-ccleansstate'] + targets) | 98 | bitbake(['-ccleansstate'] + targets) |
99 | 99 | ||
100 | bitbake(targets) | 100 | bitbake(targets) |
101 | tgz_created = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific) | 101 | archives_created = self.search_sstate('|'.join(map(str, [s + r'.*?\.tar.zst$' for s in targets])), distro_specific, distro_nonspecific) |
102 | self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_created))) | 102 | self.assertTrue(archives_created, msg="Could not find sstate .tar.zst files for: %s (%s)" % (', '.join(map(str, targets)), str(archives_created))) |
103 | 103 | ||
104 | siginfo_created = self.search_sstate('|'.join(map(str, [s + r'.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific) | 104 | siginfo_created = self.search_sstate('|'.join(map(str, [s + r'.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific) |
105 | self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s (%s)" % (', '.join(map(str, targets)), str(siginfo_created))) | 105 | self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s (%s)" % (', '.join(map(str, targets)), str(siginfo_created))) |
106 | 106 | ||
107 | bitbake(['-ccleansstate'] + targets) | 107 | bitbake(['-ccleansstate'] + targets) |
108 | tgz_removed = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific) | 108 | archives_removed = self.search_sstate('|'.join(map(str, [s + r'.*?\.tar.zst$' for s in targets])), distro_specific, distro_nonspecific) |
109 | self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_removed))) | 109 | self.assertTrue(not archives_removed, msg="do_cleansstate didn't remove .tar.zst sstate files for: %s (%s)" % (', '.join(map(str, targets)), str(archives_removed))) |
110 | 110 | ||
111 | def test_cleansstate_task_distro_specific_nonspecific(self): | 111 | def test_cleansstate_task_distro_specific_nonspecific(self): |
112 | targets = ['binutils-cross-'+ self.tune_arch, 'binutils-native'] | 112 | targets = ['binutils-cross-'+ self.tune_arch, 'binutils-native'] |
@@ -129,14 +129,14 @@ class SStateTests(SStateBase): | |||
129 | bitbake(['-ccleansstate'] + targets) | 129 | bitbake(['-ccleansstate'] + targets) |
130 | 130 | ||
131 | bitbake(targets) | 131 | bitbake(targets) |
132 | results = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True) | 132 | results = self.search_sstate('|'.join(map(str, [s + r'.*?\.tar.zst$' for s in targets])), distro_specific=False, distro_nonspecific=True) |
133 | filtered_results = [] | 133 | filtered_results = [] |
134 | for r in results: | 134 | for r in results: |
135 | if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo")): | 135 | if r.endswith(("_populate_lic.tar.zst", "_populate_lic.tar.zst.siginfo")): |
136 | continue | 136 | continue |
137 | filtered_results.append(r) | 137 | filtered_results.append(r) |
138 | self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results))) | 138 | self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results))) |
139 | file_tracker_1 = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False) | 139 | file_tracker_1 = self.search_sstate('|'.join(map(str, [s + r'.*?\.tar.zst$' for s in targets])), distro_specific=True, distro_nonspecific=False) |
140 | self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files were created for: %s" % ', '.join(map(str, targets))) | 140 | self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files were created for: %s" % ', '.join(map(str, targets))) |
141 | 141 | ||
142 | self.track_for_cleanup(self.distro_specific_sstate + "_old") | 142 | self.track_for_cleanup(self.distro_specific_sstate + "_old") |
@@ -145,7 +145,7 @@ class SStateTests(SStateBase): | |||
145 | 145 | ||
146 | bitbake(['-cclean'] + targets) | 146 | bitbake(['-cclean'] + targets) |
147 | bitbake(targets) | 147 | bitbake(targets) |
148 | file_tracker_2 = self.search_sstate('|'.join(map(str, [s + r'.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False) | 148 | file_tracker_2 = self.search_sstate('|'.join(map(str, [s + r'.*?\.tar.zst$' for s in targets])), distro_specific=True, distro_nonspecific=False) |
149 | self.assertTrue(len(file_tracker_2) >= len(targets), msg = "Not all sstate files were created for: %s" % ', '.join(map(str, targets))) | 149 | self.assertTrue(len(file_tracker_2) >= len(targets), msg = "Not all sstate files were created for: %s" % ', '.join(map(str, targets))) |
150 | 150 | ||
151 | not_recreated = [x for x in file_tracker_1 if x not in file_tracker_2] | 151 | not_recreated = [x for x in file_tracker_1 if x not in file_tracker_2] |
@@ -188,18 +188,18 @@ class SStateTests(SStateBase): | |||
188 | if not sstate_arch in sstate_archs_list: | 188 | if not sstate_arch in sstate_archs_list: |
189 | sstate_archs_list.append(sstate_arch) | 189 | sstate_archs_list.append(sstate_arch) |
190 | if target_config[idx] == target_config[-1]: | 190 | if target_config[idx] == target_config[-1]: |
191 | target_sstate_before_build = self.search_sstate(target + r'.*?\.tgz$') | 191 | target_sstate_before_build = self.search_sstate(target + r'.*?\.tar.zst$') |
192 | bitbake("-cclean %s" % target) | 192 | bitbake("-cclean %s" % target) |
193 | result = bitbake(target, ignore_status=True) | 193 | result = bitbake(target, ignore_status=True) |
194 | if target_config[idx] == target_config[-1]: | 194 | if target_config[idx] == target_config[-1]: |
195 | target_sstate_after_build = self.search_sstate(target + r'.*?\.tgz$') | 195 | target_sstate_after_build = self.search_sstate(target + r'.*?\.tar.zst$') |
196 | expected_remaining_sstate += [x for x in target_sstate_after_build if x not in target_sstate_before_build if not any(pattern in x for pattern in ignore_patterns)] | 196 | expected_remaining_sstate += [x for x in target_sstate_after_build if x not in target_sstate_before_build if not any(pattern in x for pattern in ignore_patterns)] |
197 | self.remove_config(global_config[idx]) | 197 | self.remove_config(global_config[idx]) |
198 | self.remove_recipeinc(target, target_config[idx]) | 198 | self.remove_recipeinc(target, target_config[idx]) |
199 | self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output)) | 199 | self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output)) |
200 | 200 | ||
201 | runCmd("sstate-cache-management.sh -y --cache-dir=%s --remove-duplicated --extra-archs=%s" % (self.sstate_path, ','.join(map(str, sstate_archs_list)))) | 201 | runCmd("sstate-cache-management.sh -y --cache-dir=%s --remove-duplicated --extra-archs=%s" % (self.sstate_path, ','.join(map(str, sstate_archs_list)))) |
202 | actual_remaining_sstate = [x for x in self.search_sstate(target + r'.*?\.tgz$') if not any(pattern in x for pattern in ignore_patterns)] | 202 | 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)] |
203 | 203 | ||
204 | actual_not_expected = [x for x in actual_remaining_sstate if x not in expected_remaining_sstate] | 204 | actual_not_expected = [x for x in actual_remaining_sstate if x not in expected_remaining_sstate] |
205 | self.assertFalse(actual_not_expected, msg="Files should have been removed but were not: %s" % ', '.join(map(str, actual_not_expected))) | 205 | self.assertFalse(actual_not_expected, msg="Files should have been removed but were not: %s" % ', '.join(map(str, actual_not_expected))) |