about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-02-03 22:20:28 +0900
committerGitHub <noreply@github.com>2022-02-03 22:20:28 +0900
commit95efb2b57853623a25b3b6cefc7d5dda03f923ab (patch)
treeefdb9b0b750f749338a69fe2c96d5e814868eb0d
parent7712dfd46e059ebdfe45ab2a4335355e2249cb87 (diff)
parent088474a408c19180badba6705367520daf4efc2b (diff)
Rollup merge of #93600 - last-partizan:fix-junit-formatter, r=yaahc
fix: Remove extra newlines from junit output

This PR fixes extra newline in junit output https://github.com/rust-lang/rust/issues/93454
-rw-r--r--library/test/src/formatters/junit.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/test/src/formatters/junit.rs b/library/test/src/formatters/junit.rs
index fa23cf26896..f940a9ff8f1 100644
--- a/library/test/src/formatters/junit.rs
+++ b/library/test/src/formatters/junit.rs
@@ -33,7 +33,6 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
         _shuffle_seed: Option<u64>,
     ) -> io::Result<()> {
         // We write xml header on run start
-        self.out.write_all(b"\n")?;
         self.write_message("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
     }
 
@@ -138,7 +137,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
         self.write_message("</testsuite>")?;
         self.write_message("</testsuites>")?;
 
-        self.out.write_all(b"\n\n")?;
+        self.out.write_all(b"\n")?;
 
         Ok(state.failed == 0)
     }