mirror of
https://gitee.com/openharmony/testfwk_xdevice
synced 2024-11-23 07:20:44 +00:00
!234 修复L0和L1设备中C++驱动报告异常的bug
Merge pull request !234 from liguangjie/master
This commit is contained in:
commit
76d3ecfdea
@ -367,6 +367,7 @@ class CppTestListParser(IParser):
|
||||
self.last_test_class_name = None
|
||||
self.tests = []
|
||||
self.result_data = ""
|
||||
self.suites = dict()
|
||||
|
||||
def __process__(self, lines):
|
||||
for line in lines:
|
||||
@ -384,14 +385,22 @@ class CppTestListParser(IParser):
|
||||
line)
|
||||
if class_matcher:
|
||||
self.last_test_class_name = class_matcher.group(1)
|
||||
if self.last_test_class_name not in self.suites:
|
||||
self.suites.setdefault(self.last_test_class_name, [])
|
||||
elif method_matcher:
|
||||
if not self.last_test_class_name:
|
||||
LOG.error("Parsed new test case name %s but no test class name"
|
||||
" has been set" % line)
|
||||
else:
|
||||
test = TestDescription(self.last_test_class_name,
|
||||
method_matcher.group(1))
|
||||
self.tests.append(test)
|
||||
test_name = method_matcher.group(1)
|
||||
if test_name not in self.suites.get(self.last_test_class_name, []):
|
||||
test = TestDescription(self.last_test_class_name,
|
||||
test_name)
|
||||
self.tests.append(test)
|
||||
self.suites.get(self.last_test_class_name, []).append(test_name)
|
||||
else:
|
||||
LOG.debug("[{}.{}] has already collect it, skip it.".format(
|
||||
self.last_test_class_name, test_name))
|
||||
else:
|
||||
if not check_pub_key_exist():
|
||||
LOG.debug("Line ignored: %s" % line)
|
||||
|
@ -701,7 +701,7 @@ class CTestParser(IParser):
|
||||
test_class, test_name, status, run_time = \
|
||||
self.parse_test_description(message)
|
||||
test_result = self.state_machine.test(reset=True)
|
||||
test_result.test_class = test_class
|
||||
test_result.test_class = self.state_machine.suite().suite_name
|
||||
test_result.test_name = test_name
|
||||
test_result.run_time = run_time
|
||||
self.state_machine.running_test_index += 1
|
||||
|
Loading…
Reference in New Issue
Block a user