mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-24 00:32:15 +00:00
test.py: use XPath for iterating in "TestSuite/TestSuite"
before this change, we check for the existence of "TestSuite" node under the root of XML tree, and then enumerating all "TestSuite" nodes under this "TestSuite", this approach works. but it * introduces unnecessary indent * is not very readable in this change, we just use "./TestSuite/TestSuite" for enumerating all "TestSuite" nodes under "TestSuite". simpler this way. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
8
test.py
8
test.py
@@ -1721,11 +1721,9 @@ def boost_to_junit(boost_xml, junit_xml):
|
||||
|
||||
# report produced {write_consolidated_boost_junit_xml} have the next structure suite_boost -> [suite1, suite2, ...]
|
||||
# so we are excluding the upper suite with name boost
|
||||
boost_suite = boost_root.find('TestSuite')
|
||||
if boost_suite is not None:
|
||||
test_suites = boost_suite.findall('TestSuite')
|
||||
|
||||
for test_suite in test_suites:
|
||||
for test_suite in boost_root.findall('./TestSuite/TestSuite'):
|
||||
# TODO: fix the indent
|
||||
if True:
|
||||
suite_time = 0.0
|
||||
suite_test_total = 0
|
||||
suite_test_fails_number = 0
|
||||
|
||||
Reference in New Issue
Block a user