From 15e979b5711ad09bc6abcfa85588f5814dae7102 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Tue, 17 Sep 2013 00:54:09 +0000 Subject: [PATCH] Call AllowCommandLineReparsing in unit tests. Allows us to ignore flags passed on to us by Chromium build bots without having to explicitly disable them. (Thanks pbos!) TESTED=Running modules_unittests with a bogus flag did not result in an error. TBR=kjellander Review URL: https://webrtc-codereview.appspot.com/2222005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4757 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/test/test_suite.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webrtc/test/test_suite.cc b/webrtc/test/test_suite.cc index 1917605b18..c8ff742c64 100644 --- a/webrtc/test/test_suite.cc +++ b/webrtc/test/test_suite.cc @@ -25,8 +25,9 @@ TestSuite::TestSuite(int argc, char** argv) : trace_to_stderr_(NULL) { SetExecutablePath(argv[0]); testing::InitGoogleMock(&argc, argv); // Runs InitGoogleTest() internally. - // ParseCommandLineFlags fails on unrecognized flags. Call it last so that - // any flags inteded for gtest are already filtered out. + // AllowCommandLineParsing allows us to ignore flags passed on to us by + // Chromium build bots without having to explicitly disable them. + google::AllowCommandLineReparsing(); google::ParseCommandLineFlags(&argc, &argv, true); }