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

Side by Side Diff: webrtc/voice_engine/test/auto_test/voe_standard_test.cc

Issue 3005483002: Replace remaining gflags usages with rtc_base/flags (Closed)
Patch Set: Rebase Created 3 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « webrtc/voice_engine/test/auto_test/voe_standard_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/voice_engine/test/auto_test/voe_standard_test.h" 11 #include "webrtc/voice_engine/test/auto_test/voe_standard_test.h"
12 12
13 #include <assert.h> 13 #include <assert.h>
14 #include <stdio.h> 14 #include <stdio.h>
15 #include <string.h> 15 #include <string.h>
16 16
17 #include "webrtc/rtc_base/flags.h"
17 #include "webrtc/system_wrappers/include/event_wrapper.h" 18 #include "webrtc/system_wrappers/include/event_wrapper.h"
18 #include "webrtc/typedefs.h" 19 #include "webrtc/typedefs.h"
19 #include "webrtc/voice_engine/test/auto_test/automated_mode.h" 20 #include "webrtc/voice_engine/test/auto_test/automated_mode.h"
20 #include "webrtc/voice_engine/test/auto_test/voe_test_defines.h" 21 #include "webrtc/voice_engine/test/auto_test/voe_test_defines.h"
21 #include "webrtc/voice_engine/voice_engine_defines.h" 22 #include "webrtc/voice_engine/voice_engine_defines.h"
22 23
23 DEFINE_bool(include_timing_dependent_tests, true, 24 DEFINE_bool(include_timing_dependent_tests, true,
24 "If true, we will include tests / parts of tests that are known " 25 "If true, we will include tests / parts of tests that are known "
25 "to break in slow execution environments (such as valgrind)."); 26 "to break in slow execution environments (such as valgrind).");
26 DEFINE_bool(automated, false, 27 DEFINE_bool(automated, false,
27 "If true, we'll run the automated tests we have in noninteractive " 28 "If true, we'll run the automated tests we have in noninteractive "
28 "mode."); 29 "mode.");
30 DEFINE_bool(help, false, "Print this message.");
29 31
30 namespace webrtc { 32 namespace webrtc {
31 namespace voetest { 33 namespace voetest {
32 34
33 int dummy = 0; // Dummy used in different functions to avoid warnings 35 int dummy = 0; // Dummy used in different functions to avoid warnings
34 36
35 void SubAPIManager::DisplayStatus() const { 37 void SubAPIManager::DisplayStatus() const {
36 TEST_LOG("Supported sub APIs:\n\n"); 38 TEST_LOG("Supported sub APIs:\n\n");
37 if (_base) 39 if (_base)
38 TEST_LOG(" Base\n"); 40 TEST_LOG(" Base\n");
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 96 }
95 97
96 } // namespace voetest 98 } // namespace voetest
97 } // namespace webrtc 99 } // namespace webrtc
98 100
99 #if !defined(WEBRTC_IOS) 101 #if !defined(WEBRTC_IOS)
100 int main(int argc, char** argv) { 102 int main(int argc, char** argv) {
101 // This function and RunInAutomatedMode is defined in automated_mode.cc 103 // This function and RunInAutomatedMode is defined in automated_mode.cc
102 // to avoid macro clashes with googletest (for instance ASSERT_TRUE). 104 // to avoid macro clashes with googletest (for instance ASSERT_TRUE).
103 webrtc::voetest::InitializeGoogleTest(&argc, argv); 105 webrtc::voetest::InitializeGoogleTest(&argc, argv);
104 google::ParseCommandLineFlags(&argc, &argv, true); 106 if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true)) {
107 return 1;
108 }
109 if (FLAG_help) {
110 rtc::FlagList::Print(nullptr, false);
111 return 0;
112 }
105 113
106 if (FLAGS_automated) { 114 if (FLAG_automated) {
107 return webrtc::voetest::RunInAutomatedMode(); 115 return webrtc::voetest::RunInAutomatedMode();
108 } 116 }
109 117
110 return webrtc::voetest::RunInManualMode(); 118 return webrtc::voetest::RunInManualMode();
111 } 119 }
112 #endif //#if !defined(WEBRTC_IOS) 120 #endif //#if !defined(WEBRTC_IOS)
OLDNEW
« no previous file with comments | « webrtc/voice_engine/test/auto_test/voe_standard_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698