From 7779eb74c8367bc718a2005b4af42796a5d0b023 Mon Sep 17 00:00:00 2001 From: Jane Lusby Date: Fri, 24 Sep 2021 14:45:09 -0700 Subject: [PATCH] make junit output more consistent with default format --- library/test/src/formatters/junit.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/test/src/formatters/junit.rs b/library/test/src/formatters/junit.rs index aa244807514..44a33c92a9f 100644 --- a/library/test/src/formatters/junit.rs +++ b/library/test/src/formatters/junit.rs @@ -29,7 +29,8 @@ fn write_message(&mut self, s: &str) -> io::Result<()> { 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("\n".as_bytes())?; + self.write_message("") } fn write_test_start(&mut self, _desc: &TestDesc) -> io::Result<()> { @@ -133,6 +134,8 @@ fn write_run_finish(&mut self, state: &ConsoleTestState) -> io::Result { self.write_message("")?; self.write_message("")?; + self.out.write_all("\n\n".as_bytes())?; + Ok(state.failed == 0) } }