tests: optionally write results as JUnit-style .xml