aboutsummaryrefslogtreecommitdiffstats
path: root/.ci/utils
diff options
context:
space:
mode:
authorSteven Koo <steven.koo@ni.com>2021-02-22 14:44:18 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2021-03-08 16:18:11 -0600
commita0fcdec7d5f344a5fd7873585a621bef33c25b85 (patch)
tree733129f79a1d36569f6b6a7d067b408690fac834 /.ci/utils
parent909b434e1ee6eb3797f5c070deaadfef34f11853 (diff)
downloaduhd-a0fcdec7d5f344a5fd7873585a621bef33c25b85.tar.gz
uhd-a0fcdec7d5f344a5fd7873585a621bef33c25b85.tar.bz2
uhd-a0fcdec7d5f344a5fd7873585a621bef33c25b85.zip
ci: Hardware pytests / devtests in AzDO for n310
This commit adds support for running devtests and pytests in Azure Pipelines. Devices are intentionally matrixed for adding more in the future. devtest is turned off by default for now, but can be enabled in the future. Signed-off-by: Steven Koo <steven.koo@ni.com>
Diffstat (limited to '.ci/utils')
-rw-r--r--.ci/utils/format_devtest_junitxml.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/.ci/utils/format_devtest_junitxml.py b/.ci/utils/format_devtest_junitxml.py
new file mode 100644
index 000000000..b941a64e6
--- /dev/null
+++ b/.ci/utils/format_devtest_junitxml.py
@@ -0,0 +1,22 @@
+from junitparser import JUnitXml, Element, Attr, TestCase
+import argparse
+import glob, os
+
+class ClassNameTestCase(TestCase):
+ classname = Attr('classname')
+
+parser = argparse.ArgumentParser()
+parser.add_argument("search_path")
+parser.add_argument("output_name")
+args = parser.parse_args()
+
+xml = JUnitXml()
+for file in glob.glob(args.search_path + "/**/*.xml", recursive=True):
+ xml += JUnitXml.fromfile(file)
+
+for suite in xml:
+ for case in suite:
+ classname_case = ClassNameTestCase.fromelem(case)
+ if classname_case.name == 'test_all':
+ classname_case.name = classname_case.classname
+xml.write(args.output_name)