diff options
author | Derek Mauro <dmauro@google.com> | 2023-06-28 03:46:32 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-06-28 03:47:07 (GMT) |
commit | 2acd53824402affcf473b2355d7323047e660e86 (patch) | |
tree | edbdd4f1399cd4d164b02c539efdc2f32e2f1e34 /googletest/src/gtest.cc | |
parent | f269e15c5cafa4ba7f4b543e0c395646bbbbd32d (diff) | |
download | googletest-2acd53824402affcf473b2355d7323047e660e86.zip googletest-2acd53824402affcf473b2355d7323047e660e86.tar.gz googletest-2acd53824402affcf473b2355d7323047e660e86.tar.bz2 |
On platforms without a file system, don't log an error when no
alternative output format is requested.
Fixes #4299
PiperOrigin-RevId: 543932266
Change-Id: Ide78c313ecf6829e4910f4a8407275c81edb3848
Diffstat (limited to 'googletest/src/gtest.cc')
-rw-r--r-- | googletest/src/gtest.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index d9fd277..d1eddf1 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -5655,8 +5655,10 @@ void UnitTestImpl::ConfigureXmlOutput() { << output_format << "\" ignored."; } #else - GTEST_LOG_(ERROR) << "ERROR: alternative output formats require " - << "GTEST_HAS_FILE_SYSTEM to be enabled"; + if (!output_format.empty()) { + GTEST_LOG_(ERROR) << "ERROR: alternative output formats require " + << "GTEST_HAS_FILE_SYSTEM to be enabled"; + } #endif // GTEST_HAS_FILE_SYSTEM } |