kunit: tool: Add (primitive) support for outputting JUnit XML
authorDavid Gow <david@davidgow.net>
Sat, 6 Jun 2026 01:38:18 +0000 (09:38 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 8 Jun 2026 01:50:16 +0000 (19:50 -0600)
commite9e05c72752f9d7044b3c98b863cd04ca828e258
treea9b5cdb077d123a67b48640b0ac623c7fc38102b
parentbfd73e009d02b6f4500e60970dafaa65940be8ad
kunit: tool: Add (primitive) support for outputting JUnit XML

This is used by things like Jenkins and other CI systems, which can
pretty-print the test output and potentially provide test-level comparisons
between runs.

The implementation here is pretty basic: it only provides the raw results,
split into tests and test suites, and doesn't provide any overall metadata.
However, CI systems like Jenkins can ingest it and it is already useful.

Link: https://lore.kernel.org/r/20260606013827.240790-2-david@davidgow.net
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: David Gow <david@davidgow.net>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Documentation/dev-tools/kunit/run_wrapper.rst
tools/testing/kunit/kunit.py
tools/testing/kunit/kunit_junit.py [new file with mode: 0644]
tools/testing/kunit/kunit_tool_test.py