diff options
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/ptest.py | 8 | ||||
| -rw-r--r-- | meta/lib/oeqa/utils/logparser.py | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py index 3ef9022188..23a71ea064 100644 --- a/meta/lib/oeqa/runtime/cases/ptest.py +++ b/meta/lib/oeqa/runtime/cases/ptest.py | |||
| @@ -83,12 +83,15 @@ class PtestRunnerTest(OERuntimeTestCase): | |||
| 83 | 83 | ||
| 84 | extras['ptestresult.sections'] = sections | 84 | extras['ptestresult.sections'] = sections |
| 85 | 85 | ||
| 86 | zerolength = [] | ||
| 86 | trans = str.maketrans("()", "__") | 87 | trans = str.maketrans("()", "__") |
| 87 | for section in results: | 88 | for section in results: |
| 88 | for test in results[section]: | 89 | for test in results[section]: |
| 89 | result = results[section][test] | 90 | result = results[section][test] |
| 90 | testname = "ptestresult." + (section or "No-section") + "." + "_".join(test.translate(trans).split()) | 91 | testname = "ptestresult." + (section or "No-section") + "." + "_".join(test.translate(trans).split()) |
| 91 | extras[testname] = {'status': result} | 92 | extras[testname] = {'status': result} |
| 93 | if not results[section]: | ||
| 94 | zerolength.append(section) | ||
| 92 | 95 | ||
| 93 | failed_tests = {} | 96 | failed_tests = {} |
| 94 | 97 | ||
| @@ -107,7 +110,10 @@ class PtestRunnerTest(OERuntimeTestCase): | |||
| 107 | failmsg = "ERROR: Processes were killed by the OOM Killer:\n%s\n" % output | 110 | failmsg = "ERROR: Processes were killed by the OOM Killer:\n%s\n" % output |
| 108 | 111 | ||
| 109 | if failed_tests: | 112 | if failed_tests: |
| 110 | failmsg = failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests) | 113 | failmsg = failmsg + "\nFailed ptests:\n%s\n" % pprint.pformat(failed_tests) |
| 114 | |||
| 115 | if zerolength: | ||
| 116 | failmsg = failmsg + "\nptests which had no test results:\n%s" % pprint.pformat(zerolength) | ||
| 111 | 117 | ||
| 112 | if failmsg: | 118 | if failmsg: |
| 113 | self.logger.warning("There were failing ptests.") | 119 | self.logger.warning("There were failing ptests.") |
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py index 7cb79a8402..60df754b36 100644 --- a/meta/lib/oeqa/utils/logparser.py +++ b/meta/lib/oeqa/utils/logparser.py | |||
| @@ -44,6 +44,8 @@ class PtestParser(object): | |||
| 44 | result = section_regex['begin'].search(line) | 44 | result = section_regex['begin'].search(line) |
| 45 | if result: | 45 | if result: |
| 46 | current_section['name'] = result.group(1) | 46 | current_section['name'] = result.group(1) |
| 47 | if current_section['name'] not in self.results: | ||
| 48 | self.results[current_section['name']] = {} | ||
| 47 | continue | 49 | continue |
| 48 | 50 | ||
| 49 | result = section_regex['end'].search(line) | 51 | result = section_regex['end'].search(line) |
| @@ -75,8 +77,6 @@ class PtestParser(object): | |||
| 75 | for t in test_regex: | 77 | for t in test_regex: |
| 76 | result = test_regex[t].search(line) | 78 | result = test_regex[t].search(line) |
| 77 | if result: | 79 | if result: |
| 78 | if current_section['name'] not in self.results: | ||
| 79 | self.results[current_section['name']] = {} | ||
| 80 | self.results[current_section['name']][result.group(1).strip()] = t | 80 | self.results[current_section['name']][result.group(1).strip()] = t |
| 81 | 81 | ||
| 82 | # Python performance for repeatedly joining long strings is poor, do it all at once at the end. | 82 | # Python performance for repeatedly joining long strings is poor, do it all at once at the end. |
