summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index 512cb4faa4..78f9e87044 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -23,7 +23,16 @@ class SStateTests(SStateBase):
23 bitbake(['-ccleansstate'] + targets) 23 bitbake(['-ccleansstate'] + targets)
24 24
25 bitbake(targets) 25 bitbake(targets)
26 file_tracker = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific) 26 file_tracker = []
27 results = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific)
28 if distro_nonspecific:
29 for r in results:
30 if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo", "_fetch.tgz.siginfo", "_unpack.tgz.siginfo", "_patch.tgz.siginfo")):
31 continue
32 file_tracker.append(r)
33 else:
34 file_tracker = results
35
27 if should_pass: 36 if should_pass:
28 self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets))) 37 self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
29 else: 38 else:
@@ -87,7 +96,13 @@ class SStateTests(SStateBase):
87 bitbake(['-ccleansstate'] + targets) 96 bitbake(['-ccleansstate'] + targets)
88 97
89 bitbake(targets) 98 bitbake(targets)
90 self.assertTrue(self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True) == [], msg="Found distro non-specific sstate for: %s" % ', '.join(map(str, targets))) 99 results = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True)
100 filtered_results = []
101 for r in results:
102 if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo")):
103 continue
104 filtered_results.append(r)
105 self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results)))
91 file_tracker_1 = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False) 106 file_tracker_1 = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
92 self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets))) 107 self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
93 108