Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1856)

Unified Diff: webrtc/test/test_main.cc

Issue 2540693002: Replace test_support_main by test_main and get rid of test_support_main_threaded_mac (Closed)
Patch Set: Added missing flags and GoogleMock initialization. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/run_all_unittests.cc ('k') | webrtc/test/test_suite.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
« no previous file with comments | « webrtc/test/run_all_unittests.cc ('k') | webrtc/test/test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698