summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-07 17:10:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 16:06:24 +0000
commitecb9c34bbc8bb4c86b02fde88d09985d4f2d61c6 (patch)
treefd73a4ca06a92469fe1bbb5fc5677fc4b163831a
parentae2f3a309f88147aaaae0d22c1cd145abdbe48e8 (diff)
downloadpoky-ecb9c34bbc8bb4c86b02fde88d09985d4f2d61c6.tar.gz
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>
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index 78f9e87044..643dd38647 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -36,7 +36,7 @@ class SStateTests(SStateBase):
36 if should_pass: 36 if should_pass:
37 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)))
38 else: 38 else:
39 self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets))) 39 self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s (found %s)" % (', '.join(map(str, targets)), str(file_tracker)))
40 40
41 @testcase(975) 41 @testcase(975)
42 def test_sstate_creation_distro_specific_pass(self): 42 def test_sstate_creation_distro_specific_pass(self):
@@ -65,14 +65,14 @@ class SStateTests(SStateBase):
65 65
66 bitbake(targets) 66 bitbake(targets)
67 tgz_created = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific) 67 tgz_created = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
68 self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s" % ', '.join(map(str, targets))) 68 self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_created)))
69 69
70 siginfo_created = self.search_sstate('|'.join(map(str, [s + '.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific) 70 siginfo_created = self.search_sstate('|'.join(map(str, [s + '.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific)
71 self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s" % ', '.join(map(str, targets))) 71 self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s (%s)" % (', '.join(map(str, targets)), str(siginfo_created)))
72 72
73 bitbake(['-ccleansstate'] + targets) 73 bitbake(['-ccleansstate'] + targets)
74 tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific) 74 tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
75 self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets))) 75 self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_removed)))
76 76
77 @testcase(977) 77 @testcase(977)
78 def test_cleansstate_task_distro_specific_nonspecific(self): 78 def test_cleansstate_task_distro_specific_nonspecific(self):