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

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

Issue 2991323003: Decoupling test targets from Obj-C code (Closed)
Patch Set: Decoupling test_renderer from Obj-C code Created 3 years, 4 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 | « no previous file | 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 # 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("../webrtc.gni") 9 import("../webrtc.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 "field_trial.h", 100 "field_trial.h",
101 ] 101 ]
102 102
103 deps = [ 103 deps = [
104 "..:webrtc_common", 104 "..:webrtc_common",
105 "../system_wrappers", 105 "../system_wrappers",
106 "../system_wrappers:field_trial_default", 106 "../system_wrappers:field_trial_default",
107 ] 107 ]
108 } 108 }
109 109
110 if (is_ios) {
111 rtc_source_set("objc_test_support") {
kjellander_webrtc 2017/08/14 06:56:45 I realized for targets like this we probably want
kjellander_webrtc 2017/08/14 06:56:46 test_support_objc
mbonadei 2017/08/15 13:43:13 Done.
mbonadei 2017/08/15 13:43:13 Done.
112 sources = [
113 "ios/test_support.h",
114 "ios/test_support.mm",
115 ]
116 }
117 }
118
110 rtc_source_set("test_support") { 119 rtc_source_set("test_support") {
111 testonly = true 120 testonly = true
112 121
113 sources = [ 122 sources = [
114 "gmock.h", 123 "gmock.h",
115 "gtest.h", 124 "gtest.h",
116 "testsupport/packet_reader.cc", 125 "testsupport/packet_reader.cc",
117 "testsupport/packet_reader.h", 126 "testsupport/packet_reader.h",
118 "testsupport/perf_test.cc", 127 "testsupport/perf_test.cc",
119 "testsupport/perf_test.h", 128 "testsupport/perf_test.h",
120 "testsupport/trace_to_stderr.cc", 129 "testsupport/trace_to_stderr.cc",
121 "testsupport/trace_to_stderr.h", 130 "testsupport/trace_to_stderr.h",
122 "testsupport/unittest_utils.h", 131 "testsupport/unittest_utils.h",
123 ] 132 ]
124 133
125 if (is_ios) {
126 sources += [
127 "ios/test_support.h",
128 "ios/test_support.mm",
129 ]
130 }
131
132 deps = [ 134 deps = [
133 "..:webrtc_common", 135 "..:webrtc_common",
134 "../common_video", 136 "../common_video",
135 "../rtc_base:gtest_prod", 137 "../rtc_base:gtest_prod",
136 "../rtc_base:rtc_base_approved", 138 "../rtc_base:rtc_base_approved",
137 "../system_wrappers", 139 "../system_wrappers",
138 "//testing/gmock", 140 "//testing/gmock",
139 "//testing/gtest", 141 "//testing/gtest",
140 ] 142 ]
141 143
142 public_deps = [ 144 public_deps = [
143 ":fileutils", 145 ":fileutils",
144 ] 146 ]
147 if (is_ios) {
148 public_deps += [ ":objc_test_support" ]
149 }
145 150
146 if (!build_with_chromium && is_clang) { 151 if (!build_with_chromium && is_clang) {
147 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 152 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
148 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 153 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
149 } 154 }
150 155
151 if (is_android) { 156 if (is_android) {
152 deps += [ "//base:base" ] 157 deps += [ "//base:base" ]
153 } 158 }
154 159
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 ":video_test_common", 332 ":video_test_common",
328 ":video_test_support", 333 ":video_test_support",
329 "../modules/video_capture", 334 "../modules/video_capture",
330 "//testing/gmock", 335 "//testing/gmock",
331 "//testing/gtest", 336 "//testing/gtest",
332 "//third_party/gflags", 337 "//third_party/gflags",
333 ] 338 ]
334 } 339 }
335 } 340 }
336 341
342 if (is_ios) {
343 rtc_source_set("objc_fileutils") {
344 sources = [
345 "testsupport/iosfileutils.mm",
346 ]
347 deps = [
348 "..:webrtc_common",
349 "../rtc_base:rtc_base_approved",
350 "../sdk:objc_common",
351 ]
352 }
353 }
354
337 rtc_source_set("fileutils") { 355 rtc_source_set("fileutils") {
338 testonly = true 356 testonly = true
339 sources = [ 357 sources = [
340 "testsupport/fileutils.cc", 358 "testsupport/fileutils.cc",
341 "testsupport/fileutils.h", 359 "testsupport/fileutils.h",
342 ] 360 ]
343 deps = [ 361 deps = [
344 "..:webrtc_common", 362 "..:webrtc_common",
345 "../rtc_base:rtc_base_approved", 363 "../rtc_base:rtc_base_approved",
346 ] 364 ]
347 if (is_ios) { 365 if (is_ios) {
348 sources += [ "testsupport/iosfileutils.mm" ] 366 deps += [ ":objc_fileutils" ]
349 deps += [ "../sdk:objc_common" ]
350 } 367 }
351 if (is_win) { 368 if (is_win) {
352 deps += [ "../rtc_base:rtc_base" ] 369 deps += [ "../rtc_base:rtc_base" ]
353 } 370 }
354 visibility = [ ":*" ] 371 visibility = [ ":*" ]
355 } 372 }
356 373
374 if (is_mac) {
375 rtc_source_set("objc_run_test") {
376 check_includes = false
377 sources = [
378 "mac/run_test.mm",
379 ]
380 }
381 }
382
357 rtc_source_set("run_test") { 383 rtc_source_set("run_test") {
358 testonly = true 384 testonly = true
359 sources = [ 385 sources = [
360 "run_test.h", 386 "run_test.h",
361 ] 387 ]
362 if (is_mac) { 388 if (is_mac) {
363 sources += [ "mac/run_test.mm" ] 389 deps = [
390 ":objc_run_test",
391 ]
364 } else { 392 } else {
365 sources += [ "run_test.cc" ] 393 sources += [ "run_test.cc" ]
366 } 394 }
367 } 395 }
368 396
369 rtc_source_set("fileutils_unittests") { 397 rtc_source_set("fileutils_unittests") {
370 testonly = true 398 testonly = true
371 visibility = [ ":*" ] # Only targets in this file can depend on this. 399 visibility = [ ":*" ] # Only targets in this file can depend on this.
372 sources = [ 400 sources = [
373 "testsupport/fileutils_unittest.cc", 401 "testsupport/fileutils_unittest.cc",
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 # adds -Wall, and this flag have to be after -Wall -- so they need to 537 # adds -Wall, and this flag have to be after -Wall -- so they need to
510 # come from a config and cannot be on the target directly. 538 # come from a config and cannot be on the target directly.
511 cflags = [ 539 cflags = [
512 "-Wno-bool-conversion", 540 "-Wno-bool-conversion",
513 "-Wno-comment", 541 "-Wno-comment",
514 "-Wno-delete-non-virtual-dtor", 542 "-Wno-delete-non-virtual-dtor",
515 ] 543 ]
516 } 544 }
517 } 545 }
518 546
547 if (is_mac) {
548 rtc_source_set("objc_test_renderer") {
549 check_includes = false
550 sources = [
551 "mac/video_renderer_mac.h",
552 "mac/video_renderer_mac.mm",
553 ]
554 deps = [
555 "../rtc_base:rtc_base_approved",
556 ]
557 if (!build_with_chromium && is_clang) {
558 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
559 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
560 }
561 }
562 }
563
519 rtc_source_set("test_renderer") { 564 rtc_source_set("test_renderer") {
520 testonly = true 565 testonly = true
521 libs = [] 566 libs = []
522 sources = [ 567 sources = [
523 "linux/glx_renderer.cc", 568 "linux/glx_renderer.cc",
524 "linux/glx_renderer.h", 569 "linux/glx_renderer.h",
525 "linux/video_renderer_linux.cc", 570 "linux/video_renderer_linux.cc",
526 "mac/video_renderer_mac.h",
527 "mac/video_renderer_mac.mm",
528 "video_renderer.cc", 571 "video_renderer.cc",
529 "video_renderer.h", 572 "video_renderer.h",
530 "win/d3d_renderer.cc", 573 "win/d3d_renderer.cc",
531 "win/d3d_renderer.h", 574 "win/d3d_renderer.h",
532 ] 575 ]
576 deps = [
577 ":test_support",
578 "..:webrtc_common",
579 "../common_video",
580 "../modules/media_file",
581 "../rtc_base:rtc_base_approved",
582 "//testing/gtest",
583 ]
533 if (!is_linux && !is_mac && !is_win) { 584 if (!is_linux && !is_mac && !is_win) {
534 sources += [ "null_platform_renderer.cc" ] 585 sources += [ "null_platform_renderer.cc" ]
535 } 586 }
536 if (is_linux || is_mac) { 587 if (is_linux || is_mac) {
537 sources += [ 588 sources += [
538 "gl/gl_renderer.cc", 589 "gl/gl_renderer.cc",
539 "gl/gl_renderer.h", 590 "gl/gl_renderer.h",
540 ] 591 ]
541 } 592 }
542 593
543 if (is_linux) { 594 if (is_linux) {
544 libs += [ 595 libs += [
545 "Xext", 596 "Xext",
546 "X11", 597 "X11",
547 "GL", 598 "GL",
548 ] 599 ]
549 } 600 }
550 if (is_android) { 601 if (is_android) {
551 libs += [ 602 libs += [
552 "GLESv2", 603 "GLESv2",
553 "log", 604 "log",
554 ] 605 ]
555 } 606 }
556 if (is_mac) { 607 if (is_mac) {
557 libs = [ 608 libs = [
558 "Cocoa.framework", 609 "Cocoa.framework",
559 "OpenGL.framework", 610 "OpenGL.framework",
560 "CoreVideo.framework", 611 "CoreVideo.framework",
561 ] 612 ]
613 deps += [ ":objc_test_renderer" ]
562 } 614 }
563 615
564 public_configs = [ ":test_renderer_exported_config" ] 616 public_configs = [ ":test_renderer_exported_config" ]
565 617
566 if (!build_with_chromium && is_clang) { 618 if (!build_with_chromium && is_clang) {
567 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 619 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
568 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 620 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
569 } 621 }
570
571 deps = [
572 ":test_support",
573 "..:webrtc_common",
574 "../common_video",
575 "../modules/media_file",
576 "../rtc_base:rtc_base_approved",
577 "//testing/gtest",
578 ]
579 } 622 }
580 623
581 rtc_source_set("audio_codec_mocks") { 624 rtc_source_set("audio_codec_mocks") {
582 testonly = true 625 testonly = true
583 sources = [ 626 sources = [
584 "mock_audio_decoder.cc", 627 "mock_audio_decoder.cc",
585 "mock_audio_decoder.h", 628 "mock_audio_decoder.h",
586 "mock_audio_decoder_factory.h", 629 "mock_audio_decoder_factory.h",
587 "mock_audio_encoder.cc", 630 "mock_audio_encoder.cc",
588 "mock_audio_encoder.h", 631 "mock_audio_encoder.h",
(...skipping 15 matching lines...) Expand all
604 java_files = [ 647 java_files = [
605 "android/org/webrtc/native_test/RTCNativeUnitTest.java", 648 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
606 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java", 649 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
607 ] 650 ]
608 deps = [ 651 deps = [
609 "../rtc_base:base_java", 652 "../rtc_base:base_java",
610 "//testing/android/native_test:native_test_java", 653 "//testing/android/native_test:native_test_java",
611 ] 654 ]
612 } 655 }
613 } 656 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698