diff options
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/ptest.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py index 3cfd7af7e2..2843953b38 100644 --- a/meta/lib/oeqa/runtime/cases/ptest.py +++ b/meta/lib/oeqa/runtime/cases/ptest.py | |||
@@ -49,8 +49,9 @@ class PtestRunnerTest(OERuntimeTestCase): | |||
49 | extras['ptestresult.rawlogs'] = {'log': output} | 49 | extras['ptestresult.rawlogs'] = {'log': output} |
50 | 50 | ||
51 | # Parse and save results | 51 | # Parse and save results |
52 | parse_result, sections = PtestParser().parse(ptest_runner_log) | 52 | parser = PtestParser() |
53 | parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail', 'skip']) | 53 | results, sections = parser.parse(ptest_runner_log) |
54 | parser.results_as_files(ptest_log_dir, test_status = ['pass','fail', 'skip']) | ||
54 | if os.path.exists(ptest_log_dir_link): | 55 | if os.path.exists(ptest_log_dir_link): |
55 | # Remove the old link to create a new one | 56 | # Remove the old link to create a new one |
56 | os.remove(ptest_log_dir_link) | 57 | os.remove(ptest_log_dir_link) |
@@ -60,14 +61,15 @@ class PtestRunnerTest(OERuntimeTestCase): | |||
60 | 61 | ||
61 | trans = str.maketrans("()", "__") | 62 | trans = str.maketrans("()", "__") |
62 | resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'} | 63 | resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'} |
63 | for section in parse_result.result_dict: | 64 | for section in results: |
64 | for test, result in parse_result.result_dict[section]: | 65 | for test in results[section]: |
66 | result = results[section][test] | ||
65 | testname = "ptestresult." + (section or "No-section") + "." + "_".join(test.translate(trans).split()) | 67 | testname = "ptestresult." + (section or "No-section") + "." + "_".join(test.translate(trans).split()) |
66 | extras[testname] = {'status': resmap[result]} | 68 | extras[testname] = {'status': resmap[result]} |
67 | 69 | ||
68 | failed_tests = {} | 70 | failed_tests = {} |
69 | for section in parse_result.result_dict: | 71 | for section in results: |
70 | failed_testcases = [ "_".join(test.translate(trans).split()) for test, result in parse_result.result_dict[section] if result == 'fail' ] | 72 | failed_testcases = [ "_".join(test.translate(trans).split()) for test in results[section] if results[section][test] == 'fail' ] |
71 | if failed_testcases: | 73 | if failed_testcases: |
72 | failed_tests[section] = failed_testcases | 74 | failed_tests[section] = failed_testcases |
73 | 75 | ||