mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
f1c8488084
commit
86e062d612
@@ -10,6 +10,7 @@ class PtestRunnerTest(OERuntimeTestCase):
|
|||||||
def parse_ptest(self, logfile):
|
def parse_ptest(self, logfile):
|
||||||
parser = Lparser(test_0_pass_regex="^PASS:(.+)",
|
parser = Lparser(test_0_pass_regex="^PASS:(.+)",
|
||||||
test_0_fail_regex="^FAIL:(.+)",
|
test_0_fail_regex="^FAIL:(.+)",
|
||||||
|
test_0_skip_regex="^SKIP:(.+)",
|
||||||
section_0_begin_regex="^BEGIN: .*/(.+)/ptest",
|
section_0_begin_regex="^BEGIN: .*/(.+)/ptest",
|
||||||
section_0_end_regex="^END: .*/(.+)/ptest")
|
section_0_end_regex="^END: .*/(.+)/ptest")
|
||||||
parser.init()
|
parser.init()
|
||||||
@@ -38,6 +39,10 @@ class PtestRunnerTest(OERuntimeTestCase):
|
|||||||
result.store(current_section, name, status)
|
result.store(current_section, name, status)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if line_type == 'test' and status == 'skip':
|
||||||
|
result.store(current_section, name, status)
|
||||||
|
continue
|
||||||
|
|
||||||
result.sort_tests()
|
result.sort_tests()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@@ -70,7 +75,7 @@ class PtestRunnerTest(OERuntimeTestCase):
|
|||||||
|
|
||||||
# Parse and save results
|
# Parse and save results
|
||||||
parse_result = self.parse_ptest(ptest_runner_log)
|
parse_result = self.parse_ptest(ptest_runner_log)
|
||||||
parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail'])
|
parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail', 'skip'])
|
||||||
if os.path.exists(ptest_log_dir_link):
|
if os.path.exists(ptest_log_dir_link):
|
||||||
# Remove the old link to create a new one
|
# Remove the old link to create a new one
|
||||||
os.remove(ptest_log_dir_link)
|
os.remove(ptest_log_dir_link)
|
||||||
|
|||||||
Reference in New Issue
Block a user