]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/logparser: ignore test failure commentary
authorRoss Burton <ross.burton@intel.com>
Wed, 19 Jun 2019 15:16:11 +0000 (16:16 +0100)
committerArmin Kuster <akuster808@gmail.com>
Thu, 27 Jun 2019 13:56:20 +0000 (06:56 -0700)
The output format for Python and GLib both can be of this form:

FAIL: foobar (Segmentation fault)

In this case the test is called foobar not foobar_segmentation_fault.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/lib/oeqa/utils/logparser.py

index cc6d18d94a0236b5a6688cda49414d6eabb8e392..b31214b1c728da56c0cdc4fb9060256cdb3b7b52 100644 (file)
@@ -16,7 +16,7 @@ class PtestParser(object):
     def parse(self, logfile):
         test_regex = {}
         test_regex['PASSED'] = re.compile(r"^PASS:(.+)")
-        test_regex['FAILED'] = re.compile(r"^FAIL:(.+)")
+        test_regex['FAILED'] = re.compile(r"^FAIL:([^(]+)")
         test_regex['SKIPPED'] = re.compile(r"^SKIP:(.+)")
 
         section_regex = {}
@@ -69,7 +69,7 @@ class PtestParser(object):
                     if result:
                         if current_section['name'] not in self.results:
                             self.results[current_section['name']] = {}
-                        self.results[current_section['name']][result.group(1)] = t
+                        self.results[current_section['name']][result.group(1).strip()] = t
 
         return self.results, self.sections