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

Side by Side Diff: webrtc/test/BUILD.gn

Issue 2540693002: Replace test_support_main by test_main and get rid of test_support_main_threaded_mac (Closed)
Patch Set: Adressed comments. Created 4 years 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/system_wrappers/BUILD.gn ('k') | webrtc/test/run_all_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("../build/webrtc.gni") 9 import("../build/webrtc.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
11 if (is_android) { 11 if (is_android) {
12 import("//build/config/android/rules.gni") 12 import("//build/config/android/rules.gni")
13 } 13 }
14 if (rtc_use_memcheck) { 14 if (rtc_use_memcheck) {
15 import("//tools/valgrind-webrtc/valgrind-webrtc.gni") 15 import("//tools/valgrind-webrtc/valgrind-webrtc.gni")
16 } 16 }
17 17
18 group("test") { 18 group("test") {
19 testonly = true 19 testonly = true
20 20
21 deps = [ 21 deps = [
22 ":field_trial", 22 ":field_trial",
23 ":rtp_test_utils", 23 ":rtp_test_utils",
24 ":test_common", 24 ":test_common",
25 ":test_main",
25 ":test_renderer", 26 ":test_renderer",
26 ":test_support", 27 ":test_support",
27 ":test_support_main",
28 ":test_support_unittests", 28 ":test_support_unittests",
29 ":video_test_common", 29 ":video_test_common",
30 ] 30 ]
31 } 31 }
32 32
33 rtc_source_set("video_test_common") { 33 rtc_source_set("video_test_common") {
34 testonly = true 34 testonly = true
35 sources = [ 35 sources = [
36 "fake_texture_frame.cc", 36 "fake_texture_frame.cc",
37 "fake_texture_frame.h", 37 "fake_texture_frame.h",
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 rtc_source_set("test_main") { 91 rtc_source_set("test_main") {
92 testonly = true 92 testonly = true
93 sources = [ 93 sources = [
94 "test_main.cc", 94 "test_main.cc",
95 ] 95 ]
96 96
97 deps = [ 97 deps = [
98 ":field_trial", 98 ":field_trial",
99 ":test_support", 99 ":test_support",
100 "../system_wrappers:metrics_default", 100 "../system_wrappers:metrics_default",
101 "//testing/gmock",
101 "//testing/gtest", 102 "//testing/gtest",
102 "//third_party/gflags", 103 "//third_party/gflags",
103 ] 104 ]
104 } 105 }
105 106
106 rtc_source_set("test_support") { 107 rtc_source_set("test_support") {
107 testonly = true 108 testonly = true
108 109
109 sources = [ 110 sources = [
110 "gmock.h", 111 "gmock.h",
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 data = [ 157 data = [
157 "../build/android/test_runner.py", 158 "../build/android/test_runner.py",
158 ] 159 ]
159 } 160 }
160 161
161 if (rtc_use_memcheck) { 162 if (rtc_use_memcheck) {
162 data = valgrind_webrtc_dependencies 163 data = valgrind_webrtc_dependencies
163 } 164 }
164 } 165 }
165 166
166 # Depend on this target when you want to have test_support but also the
167 # main method needed for gtest to execute!
168 rtc_source_set("test_support_main") {
169 testonly = true
170
171 sources = [
172 "run_all_unittests.cc",
173 "test_suite.cc",
174 "test_suite.h",
175 ]
176
177 deps = [
178 ":field_trial",
179 ":test_support",
180 "../system_wrappers:metrics_default",
181 "//testing/gmock",
182 "//testing/gtest",
183 "//third_party/gflags",
184 ]
185 }
186
187 # Depend on this target when you want to have test_support and a special
188 # main for mac which will run your test on a worker thread and consume
189 # events on the main thread. Useful if you want to access a webcam.
190 # This main will provide all the scaffolding and objective-c black magic
191 # for you. All you need to do is to implement a function in the
192 # run_threaded_main_mac.h file (ImplementThisToRunYourTest).
193 rtc_source_set("test_support_main_threaded_mac") {
194 testonly = true
195
196 sources = [
197 "testsupport/mac/run_threaded_main_mac.h",
198 "testsupport/mac/run_threaded_main_mac.mm",
199 ]
200
201 deps = [
202 ":test_support",
203 ]
204 }
205
206 rtc_source_set("run_test") { 167 rtc_source_set("run_test") {
207 testonly = true 168 testonly = true
208 sources = [ 169 sources = [
209 "run_test.h", 170 "run_test.h",
210 ] 171 ]
211 if (is_mac) { 172 if (is_mac) {
212 sources += [ "mac/run_test.mm" ] 173 sources += [ "mac/run_test.mm" ]
213 } else { 174 } else {
214 sources += [ "run_test.cc" ] 175 sources += [ "run_test.cc" ]
215 } 176 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 deps += [ "//testing/android/native_test:native_test_support" ] 230 deps += [ "//testing/android/native_test:native_test_support" ]
270 shard_timeout = 900 231 shard_timeout = 900
271 } 232 }
272 233
273 if (is_ios) { 234 if (is_ios) {
274 deps += [ ":test_support_unittests_bundle_data" ] 235 deps += [ ":test_support_unittests_bundle_data" ]
275 } 236 }
276 237
277 deps += [ 238 deps += [
278 ":test_common", 239 ":test_common",
279 ":test_support_main", 240 ":test_main",
280 "../modules/video_capture", 241 "../modules/video_capture",
281 "//testing/gmock", 242 "//testing/gmock",
282 "//testing/gtest", 243 "//testing/gtest",
283 ] 244 ]
284 } 245 }
285 246
286 rtc_source_set("test_common") { 247 rtc_source_set("test_common") {
287 testonly = true 248 testonly = true
288 sources = [ 249 sources = [
289 "call_test.cc", 250 "call_test.cc",
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 381 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
421 } 382 }
422 383
423 deps = [ 384 deps = [
424 ":test_support", 385 ":test_support",
425 ":video_test_common", 386 ":video_test_common",
426 "../modules/media_file", 387 "../modules/media_file",
427 "//testing/gtest", 388 "//testing/gtest",
428 ] 389 ]
429 } 390 }
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/BUILD.gn ('k') | webrtc/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698