From 98c76a120dad9556574db4de5fc2f7b53e35e4a5 Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Wed, 14 May 2014 06:01:40 +0000 Subject: [PATCH] Make vie/voe_auto_test accept non-supported flags without error. With the switch recipes on the buildbots and the deprecation of the custom script at https://code.google.com/p/webrtc/source/browse/trunk/webrtc/test/buildbot_tests.py these tests will start failing when Chromium's runtest.py is passing --brave-new-test-launcher --test-launcher-bot-mode to the test. A similar change was made for most of WebRTC's tests (that depends on the test_support_main target) in https://webrtc-codereview.appspot.com/2222005 BUG=chromium:346198 TEST=Successfully launched the executables on Linux and Mac using: out/Release/voe_auto_test --brave-new-test-launcher --test-launcher-bot-mode --automated --test-launcher-summary-output=/tmp/tmpwhx6Zz out/Release/vie_auto_test --brave-new-test-launcher --test-launcher-bot-mode --automated --capture_test_ensure_resolution_alignment_in_capture_device=false --test-launcher-summary-output=/tmp/tmpwhx6Zz R=henrika@webrtc.org, mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/13499004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6135 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc | 3 +++ webrtc/voice_engine/test/auto_test/voe_standard_test.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc index 00e86066f..a1e45c129 100644 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc @@ -43,6 +43,9 @@ int ViEAutoTestMain::RunTests(int argc, char** argv) { webrtc::test::SetExecutablePath(argv[0]); // Initialize the testing framework. testing::InitGoogleTest(&argc, argv); + // AllowCommandLineParsing allows us to ignore flags passed on to us by + // Chromium build bots without having to explicitly disable them. + google::AllowCommandLineReparsing(); // Parse remaining flags: google::ParseCommandLineFlags(&argc, &argv, true); diff --git a/webrtc/voice_engine/test/auto_test/voe_standard_test.cc b/webrtc/voice_engine/test/auto_test/voe_standard_test.cc index 944f3b10c..d3fd478a5 100644 --- a/webrtc/voice_engine/test/auto_test/voe_standard_test.cc +++ b/webrtc/voice_engine/test/auto_test/voe_standard_test.cc @@ -341,6 +341,9 @@ int main(int argc, char** argv) { // This function and RunInAutomatedMode is defined in automated_mode.cc // to avoid macro clashes with googletest (for instance ASSERT_TRUE). InitializeGoogleTest(&argc, argv); + // 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); if (FLAGS_automated) {