diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-29 14:22:07 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-31 23:23:26 +0000 |
commit | 3731033435b6a432b9a67da54f09761288c211e4 (patch) | |
tree | 1512dd26b48730211405f5bbf09d716e19d1e549 /meta/lib/oeqa/runtime | |
parent | 88f390bcb68650df08d8d636cba1aaf7b69b2999 (diff) | |
download | poky-3731033435b6a432b9a67da54f09761288c211e4.tar.gz |
oeqa/utils/logparser: Add in support for duration, exitcode and logs by section
Allow parsing of the ptest duration, exit code and timeout keywords
from the logs, returning data on each section.
Also include the logs broken out per section.
(From OE-Core rev: a9a67dccaa5be0f06eedcab46dcff7cbf9202850)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/ptest.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py index ae54a01669..3cfd7af7e2 100644 --- a/meta/lib/oeqa/runtime/cases/ptest.py +++ b/meta/lib/oeqa/runtime/cases/ptest.py | |||
@@ -49,13 +49,15 @@ 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 = PtestParser().parse(ptest_runner_log) | 52 | parse_result, sections = PtestParser().parse(ptest_runner_log) |
53 | parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail', 'skip']) | 53 | parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail', 'skip']) |
54 | if os.path.exists(ptest_log_dir_link): | 54 | if os.path.exists(ptest_log_dir_link): |
55 | # Remove the old link to create a new one | 55 | # Remove the old link to create a new one |
56 | os.remove(ptest_log_dir_link) | 56 | os.remove(ptest_log_dir_link) |
57 | os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link) | 57 | os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link) |
58 | 58 | ||
59 | extras['ptestresult.sections'] = sections | ||
60 | |||
59 | trans = str.maketrans("()", "__") | 61 | trans = str.maketrans("()", "__") |
60 | resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'} | 62 | resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'} |
61 | for section in parse_result.result_dict: | 63 | for section in parse_result.result_dict: |