Index: webrtc/test/test_main.cc |
diff --git a/webrtc/test/test_main.cc b/webrtc/test/test_main.cc |
index b75e78c9dd5560905d193639371b858497ff4396..8a3ec3ce860e63c1ac47160b8d442eaeb651431b 100644 |
--- a/webrtc/test/test_main.cc |
+++ b/webrtc/test/test_main.cc |
@@ -12,25 +12,27 @@ |
#include "webrtc/base/logging.h" |
#include "webrtc/system_wrappers/include/metrics_default.h" |
#include "webrtc/test/field_trial.h" |
+#include "webrtc/test/gmock.h" |
#include "webrtc/test/gtest.h" |
#include "webrtc/test/testsupport/fileutils.h" |
+DEFINE_bool(logs, false, "print logs to stderr"); |
+ |
DEFINE_string(force_fieldtrials, "", |
"Field trials control experimental feature code which can be forced. " |
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/" |
" will assign the group Enable to field trial WebRTC-FooFeature."); |
int main(int argc, char* argv[]) { |
- ::testing::InitGoogleTest(&argc, argv); |
+ ::testing::InitGoogleMock(&argc, argv); |
// Default to LS_INFO, even for release builds to provide better test logging. |
// TODO(pbos): Consider adding a command-line override. |
if (rtc::LogMessage::GetLogToDebug() > rtc::LS_INFO) |
rtc::LogMessage::LogToDebug(rtc::LS_INFO); |
- // AllowCommandLineParsing allows us to ignore flags passed on to us by |
- // Chromium build bots without having to explicitly disable them. |
- google::AllowCommandLineReparsing(); |
kjellander_webrtc
2016/11/30 06:29:44
We need to keep this for the moment. And when it's
|
+ rtc::LogMessage::SetLogToStderr(FLAGS_logs); |
kjellander_webrtc
2016/11/30 06:29:44
You should also add:
if (FLAGS_logs)
trace_to_
|
+ |
google::ParseCommandLineFlags(&argc, &argv, false); |
webrtc::test::SetExecutablePath(argv[0]); |