Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] selftest/bbtests.py: Fixed regex and added bitbake output to test_warnings_errors
@ 2014-03-26 16:48 Corneliu Stoicescu
  2014-03-26 16:33 ` Alexandru Palalau
  0 siblings, 1 reply; 2+ messages in thread
From: Corneliu Stoicescu @ 2014-03-26 16:48 UTC (permalink / raw)
  To: openembedded-core

The test failed when more than 1 error or 1 warning is present.
Also pasting the bitbake output when the test fails.

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
---
 meta/lib/oeqa/selftest/bbtests.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index ee1f82a..d7dc127 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -47,10 +47,10 @@ class BitbakeTests(oeSelfTest):
 
     def test_warnings_errors(self):
         result = bitbake('-b asdf', ignore_status=True)
-        find_warnings = re.search("Summary: There was [1-9][0-9]* WARNING message shown.", result.output)
-        find_errors = re.search("Summary: There was [1-9][0-9]* ERROR message shown.", result.output)
-        self.assertTrue(find_warnings)
-        self.assertTrue(find_errors)
+        find_warnings = re.search("Summary: There wa.{1,2}? [1-9][0-9]* WARNING messages* shown", result.output)
+        find_errors = re.search("Summary: There wa.{1,2}? [1-9][0-9]* ERROR messages* shown", result.output)
+        self.assertTrue(find_warnings, msg="Did not find the mumber of warnings at the end of the build:\n" + result.output)
+        self.assertTrue(find_errors, msg="Did not find the mumber of errors at the end of the build:\n" + result.output)
 
     def test_invalid_patch(self):
         self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-26 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 16:48 [PATCH] selftest/bbtests.py: Fixed regex and added bitbake output to test_warnings_errors Corneliu Stoicescu
2014-03-26 16:33 ` Alexandru Palalau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox