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>
This commit is contained in:
parent
a43b9ef53d
commit
eb53c54675
|
@ -23,7 +23,16 @@ class SStateTests(SStateBase):
|
|||
bitbake(['-ccleansstate'] + targets)
|
||||
|
||||
bitbake(targets)
|
||||
file_tracker = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific)
|
||||
file_tracker = []
|
||||
results = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific)
|
||||
if distro_nonspecific:
|
||||
for r in results:
|
||||
if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo", "_fetch.tgz.siginfo", "_unpack.tgz.siginfo", "_patch.tgz.siginfo")):
|
||||
continue
|
||||
file_tracker.append(r)
|
||||
else:
|
||||
file_tracker = results
|
||||
|
||||
if should_pass:
|
||||
self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
|
||||
else:
|
||||
|
@ -87,7 +96,13 @@ class SStateTests(SStateBase):
|
|||
bitbake(['-ccleansstate'] + targets)
|
||||
|
||||
bitbake(targets)
|
||||
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)))
|
||||
results = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True)
|
||||
filtered_results = []
|
||||
for r in results:
|
||||
if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo")):
|
||||
continue
|
||||
filtered_results.append(r)
|
||||
self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results)))
|
||||
file_tracker_1 = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
|
||||
self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue