diff --git a/library/test/src/formatters/junit.rs b/library/test/src/formatters/junit.rs index aa24480751419..04057906d1c3e 100644 --- a/library/test/src/formatters/junit.rs +++ b/library/test/src/formatters/junit.rs @@ -29,7 +29,8 @@ impl JunitFormatter { impl OutputFormatter for JunitFormatter { fn write_run_start(&mut self, _test_count: usize) -> io::Result<()> { // We write xml header on run start - self.write_message(&"") + self.out.write_all(b"\n")?; + self.write_message("") } fn write_test_start(&mut self, _desc: &TestDesc) -> io::Result<()> { @@ -133,6 +134,8 @@ impl OutputFormatter for JunitFormatter { self.write_message("")?; self.write_message("")?; + self.out.write_all(b"\n\n")?; + Ok(state.failed == 0) } }