From 58537cde0607eb3ca4076e00b8e2cfac52827ca1 Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Fri, 28 Apr 2023 18:37:26 -0400 Subject: [PATCH] junit: fix typo in comment and don't include output for passes when not requested --- library/test/src/formatters/junit.rs | 4 ++-- tests/run-make/libtest-junit/output-default.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/test/src/formatters/junit.rs b/library/test/src/formatters/junit.rs index 65883dd36a169..9f5bf24367eaa 100644 --- a/library/test/src/formatters/junit.rs +++ b/library/test/src/formatters/junit.rs @@ -31,7 +31,7 @@ fn str_to_cdata(s: &str) -> String { // `", "]]]]>"); let escaped_output = escaped_output.replace(" ", ""); @@ -163,7 +163,7 @@ impl OutputFormatter for JunitFormatter { test_name, duration.as_secs_f64() ))?; - if stdout.is_empty() { + if stdout.is_empty() || !state.options.display_output { self.write_message("/>")?; } else { self.write_message(">")?; diff --git a/tests/run-make/libtest-junit/output-default.xml b/tests/run-make/libtest-junit/output-default.xml index 0c300611e1f76..d59e07b8ad89d 100644 --- a/tests/run-make/libtest-junit/output-default.xml +++ b/tests/run-make/libtest-junit/output-default.xml @@ -1 +1 @@ - +