aboutsummaryrefslogtreecommitdiffstats
path: root/.github/scripts/tests/junit_utils.py
diff options
context:
space:
mode:
authorNikita Kozlovskiy <nikitka@gmail.com>2023-06-12 08:03:15 +0000
committernkozlovskiy <nmk@ydb.tech>2023-06-12 11:03:15 +0300
commit274eed8957285f3b12aad2bd2ec3cdbd501a9571 (patch)
treebc15885135d34777b13d75560a6f94c0d5ed0ccc /.github/scripts/tests/junit_utils.py
parentd4d1325a138f2bea1fbb4aa9ef8266382f7a09d1 (diff)
downloadydb-274eed8957285f3b12aad2bd2ec3cdbd501a9571.tar.gz
ci: write test shard name for testmo report
ci: write test shard name for testmo report Pull Request resolved: #249
Diffstat (limited to '.github/scripts/tests/junit_utils.py')
-rw-r--r--.github/scripts/tests/junit_utils.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/.github/scripts/tests/junit_utils.py b/.github/scripts/tests/junit_utils.py
new file mode 100644
index 0000000000..c1aea12f80
--- /dev/null
+++ b/.github/scripts/tests/junit_utils.py
@@ -0,0 +1,22 @@
+from xml.etree import ElementTree as ET
+
+
+def get_or_create_properties(testcase):
+ props = testcase.find("properties")
+ if props is None:
+ props = ET.Element("properties")
+ testcase.append(props)
+ return props
+
+
+def add_junit_link_property(testcase, name, url):
+ add_junit_property(testcase, f"url:{name}", url)
+
+
+def add_junit_property(testcase, name, value):
+ props = get_or_create_properties(testcase)
+ props.append(ET.Element("property", dict(name=name, value=value)))
+
+
+def add_junit_log_property(testcase, url):
+ add_junit_link_property(testcase, "Log", url)