diff options
| author | Robert Yang <liezhi.yang@windriver.com> | 2017-08-21 18:23:07 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-23 14:16:01 +0100 |
| commit | 86e062d61259696ca610bdfc8a02e3ea86ccf3f8 (patch) | |
| tree | d5843e46e6e99f316c783f88a1575e1f3332065a | |
| parent | f1c8488084bb77125d244301b63b6b796d7157db (diff) | |
| download | poky-86e062d61259696ca610bdfc8a02e3ea86ccf3f8.tar.gz | |
runtime/cases/_ptest.py: add skip status
The packages' test cases maybe skipped, check and save them.
[YOCTO #11547]
(From OE-Core rev: 5c89060e96919c9865034a0c64fde382763da71d)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/_ptest.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/_ptest.py b/meta/lib/oeqa/runtime/cases/_ptest.py index 6d239494b8..ec8c038a56 100644 --- a/meta/lib/oeqa/runtime/cases/_ptest.py +++ b/meta/lib/oeqa/runtime/cases/_ptest.py | |||
| @@ -10,6 +10,7 @@ class PtestRunnerTest(OERuntimeTestCase): | |||
| 10 | def parse_ptest(self, logfile): | 10 | def parse_ptest(self, logfile): |
| 11 | parser = Lparser(test_0_pass_regex="^PASS:(.+)", | 11 | parser = Lparser(test_0_pass_regex="^PASS:(.+)", |
| 12 | test_0_fail_regex="^FAIL:(.+)", | 12 | test_0_fail_regex="^FAIL:(.+)", |
| 13 | test_0_skip_regex="^SKIP:(.+)", | ||
| 13 | section_0_begin_regex="^BEGIN: .*/(.+)/ptest", | 14 | section_0_begin_regex="^BEGIN: .*/(.+)/ptest", |
| 14 | section_0_end_regex="^END: .*/(.+)/ptest") | 15 | section_0_end_regex="^END: .*/(.+)/ptest") |
| 15 | parser.init() | 16 | parser.init() |
| @@ -38,6 +39,10 @@ class PtestRunnerTest(OERuntimeTestCase): | |||
| 38 | result.store(current_section, name, status) | 39 | result.store(current_section, name, status) |
| 39 | continue | 40 | continue |
| 40 | 41 | ||
| 42 | if line_type == 'test' and status == 'skip': | ||
| 43 | result.store(current_section, name, status) | ||
| 44 | continue | ||
| 45 | |||
| 41 | result.sort_tests() | 46 | result.sort_tests() |
| 42 | return result | 47 | return result |
| 43 | 48 | ||
| @@ -70,7 +75,7 @@ class PtestRunnerTest(OERuntimeTestCase): | |||
| 70 | 75 | ||
| 71 | # Parse and save results | 76 | # Parse and save results |
| 72 | parse_result = self.parse_ptest(ptest_runner_log) | 77 | parse_result = self.parse_ptest(ptest_runner_log) |
| 73 | parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail']) | 78 | parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail', 'skip']) |
| 74 | if os.path.exists(ptest_log_dir_link): | 79 | if os.path.exists(ptest_log_dir_link): |
| 75 | # Remove the old link to create a new one | 80 | # Remove the old link to create a new one |
| 76 | os.remove(ptest_log_dir_link) | 81 | os.remove(ptest_log_dir_link) |
