summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-07 17:10:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-07 17:30:01 +0000
commiteb53c5467566135fcf2497b567273efd0f74f54b (patch)
tree30a889fc977301477c08f24910815c22b12c4ca1
parenta43b9ef53d880dd76d4965ddcd999b5757a152d1 (diff)
downloadpoky-eb53c5467566135fcf2497b567273efd0f74f54b.tar.gz
sstatetests: Fix after change to sstate populate_lic SWSPEC
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9fd214d2e7a931cfb46f40cb76d49aeb07af612e changed SSTATE_SWSPEC, correctly however it did mean that some sstate files now appear where the tests don't expect them. Filter the test results to ignore the correct behaviour. (From OE-Core rev: e86947bb79a9cb1b59a564ee511739f8a2b2b913) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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