summaryrefslogtreecommitdiff
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:29:46 +0000
commite86947bb79a9cb1b59a564ee511739f8a2b2b913 (patch)
tree2cba48fbb32e1626848e6e5b82fa70c2b55345fb
parentcf2877828c9cecbbde298af9bc53c42394ada2a4 (diff)
downloadopenembedded-core-e86947bb79a9cb1b59a564ee511739f8a2b2b913.tar.gz
openembedded-core-e86947bb79a9cb1b59a564ee511739f8a2b2b913.tar.bz2
openembedded-core-e86947bb79a9cb1b59a564ee511739f8a2b2b913.zip
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. 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):
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)))