Skip to content

Commit

Permalink
On platforms without a file system, don't log an error when no
Browse files Browse the repository at this point in the history
alternative output format is requested.

Fixes #4299

PiperOrigin-RevId: 543932266
Change-Id: Ide78c313ecf6829e4910f4a8407275c81edb3848
  • Loading branch information
derekmauro authored and copybara-github committed Jun 28, 2023
1 parent f269e15 commit 2acd538
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions googletest/src/gtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 2acd538

Please sign in to comment.