mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
oeqa: Improve test failure messages
When the test fails, print the incorrect values so aid debugging. (From OE-Core rev: 115f479ff91347ecb5069e89e193a5c678e7dc35) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -36,7 +36,7 @@ class SStateTests(SStateBase):
|
|||||||
if should_pass:
|
if should_pass:
|
||||||
self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
|
self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
|
||||||
else:
|
else:
|
||||||
self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets)))
|
self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s (found %s)" % (', '.join(map(str, targets)), str(file_tracker)))
|
||||||
|
|
||||||
@testcase(975)
|
@testcase(975)
|
||||||
def test_sstate_creation_distro_specific_pass(self):
|
def test_sstate_creation_distro_specific_pass(self):
|
||||||
@@ -65,14 +65,14 @@ class SStateTests(SStateBase):
|
|||||||
|
|
||||||
bitbake(targets)
|
bitbake(targets)
|
||||||
tgz_created = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
|
tgz_created = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
|
||||||
self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s" % ', '.join(map(str, targets)))
|
self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_created)))
|
||||||
|
|
||||||
siginfo_created = self.search_sstate('|'.join(map(str, [s + '.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific)
|
siginfo_created = self.search_sstate('|'.join(map(str, [s + '.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific)
|
||||||
self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s" % ', '.join(map(str, targets)))
|
self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s (%s)" % (', '.join(map(str, targets)), str(siginfo_created)))
|
||||||
|
|
||||||
bitbake(['-ccleansstate'] + targets)
|
bitbake(['-ccleansstate'] + targets)
|
||||||
tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
|
tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
|
||||||
self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets)))
|
self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_removed)))
|
||||||
|
|
||||||
@testcase(977)
|
@testcase(977)
|
||||||
def test_cleansstate_task_distro_specific_nonspecific(self):
|
def test_cleansstate_task_distro_specific_nonspecific(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user