Skip to content

Commit 2acd538

Browse files
derekmaurocopybara-github
authored andcommitted
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
1 parent f269e15 commit 2acd538

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

googletest/src/gtest.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -5655,8 +5655,10 @@ void UnitTestImpl::ConfigureXmlOutput() {
56555655
<< output_format << "\" ignored.";
56565656
}
56575657
#else
5658-
GTEST_LOG_(ERROR) << "ERROR: alternative output formats require "
5659-
<< "GTEST_HAS_FILE_SYSTEM to be enabled";
5658+
if (!output_format.empty()) {
5659+
GTEST_LOG_(ERROR) << "ERROR: alternative output formats require "
5660+
<< "GTEST_HAS_FILE_SYSTEM to be enabled";
5661+
}
56605662
#endif // GTEST_HAS_FILE_SYSTEM
56615663
}
56625664

0 commit comments

Comments
 (0)