Skip to content

pr-git-732/dscho/ci-xml-error-v1

From: Johannes Schindelin <johannes.schindelin@gmx.de>

When a test case is run in a subshell, we finalize the JUnit-style XML
when said subshell exits. But then we continue to write into that XML as
if nothing had happened.

This leads to Azure Pipelines' Publish Test Results task complaining:

	Failed to read /home/vsts/work/1/s/t/out/TEST-t0000-basic.xml.
	Error : Unexpected end tag. Line 110, position 5.

And indeed, the resulting XML is incorrect.

Let's "re-open" the XML in such a case, i.e. remove the previously added
closing tags.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Submitted-As: https://lore.kernel.org/git/pull.732.git.git.1584967475669.gitgitgadget@gmail.com
Assets 2