OLD | NEW |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 "field_trial.h", | 102 "field_trial.h", |
103 ] | 103 ] |
104 | 104 |
105 deps = [ | 105 deps = [ |
106 "..:webrtc_common", | 106 "..:webrtc_common", |
107 "../system_wrappers", | 107 "../system_wrappers", |
108 "../system_wrappers:field_trial_default", | 108 "../system_wrappers:field_trial_default", |
109 ] | 109 ] |
110 } | 110 } |
111 | 111 |
| 112 if (is_ios) { |
| 113 rtc_source_set("test_support_objc") { |
| 114 testonly = true |
| 115 visibility = [ ":*" ] |
| 116 sources = [ |
| 117 "ios/test_support.h", |
| 118 "ios/test_support.mm", |
| 119 ] |
| 120 } |
| 121 } |
| 122 |
112 rtc_source_set("test_support") { | 123 rtc_source_set("test_support") { |
113 testonly = true | 124 testonly = true |
114 | 125 |
115 sources = [ | 126 sources = [ |
116 "gmock.h", | 127 "gmock.h", |
117 "gtest.h", | 128 "gtest.h", |
118 "testsupport/packet_reader.cc", | 129 "testsupport/packet_reader.cc", |
119 "testsupport/packet_reader.h", | 130 "testsupport/packet_reader.h", |
120 "testsupport/perf_test.cc", | 131 "testsupport/perf_test.cc", |
121 "testsupport/perf_test.h", | 132 "testsupport/perf_test.h", |
122 "testsupport/trace_to_stderr.cc", | 133 "testsupport/trace_to_stderr.cc", |
123 "testsupport/trace_to_stderr.h", | 134 "testsupport/trace_to_stderr.h", |
124 "testsupport/unittest_utils.h", | 135 "testsupport/unittest_utils.h", |
125 ] | 136 ] |
126 | 137 |
| 138 public_deps = [ |
| 139 ":fileutils", |
| 140 ] |
127 if (is_ios) { | 141 if (is_ios) { |
128 sources += [ | 142 public_deps += [ ":test_support_objc" ] |
129 "ios/test_support.h", | |
130 "ios/test_support.mm", | |
131 ] | |
132 } | 143 } |
133 | 144 |
134 deps = [ | 145 deps = [ |
135 "..:webrtc_common", | 146 "..:webrtc_common", |
136 "../common_video", | 147 "../common_video", |
137 "../rtc_base:gtest_prod", | 148 "../rtc_base:gtest_prod", |
138 "../rtc_base:rtc_base_approved", | 149 "../rtc_base:rtc_base_approved", |
139 "../system_wrappers", | 150 "../system_wrappers", |
140 "//testing/gmock", | 151 "//testing/gmock", |
141 "//testing/gtest", | 152 "//testing/gtest", |
142 ] | 153 ] |
143 | 154 |
144 public_deps = [ | |
145 ":fileutils", | |
146 ] | |
147 | |
148 if (!build_with_chromium && is_clang) { | 155 if (!build_with_chromium && is_clang) { |
149 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 156 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
150 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 157 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
151 } | 158 } |
152 | 159 |
153 if (is_android) { | 160 if (is_android) { |
154 deps += [ "//base:base" ] | 161 deps += [ "//base:base" ] |
155 } | 162 } |
156 | 163 |
157 if (is_ios && !build_with_chromium) { | 164 if (is_ios && !build_with_chromium) { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 ":video_test_common", | 343 ":video_test_common", |
337 ":video_test_support", | 344 ":video_test_support", |
338 "../modules/video_capture", | 345 "../modules/video_capture", |
339 "//testing/gmock", | 346 "//testing/gmock", |
340 "//testing/gtest", | 347 "//testing/gtest", |
341 "//third_party/gflags", | 348 "//third_party/gflags", |
342 ] | 349 ] |
343 } | 350 } |
344 } | 351 } |
345 | 352 |
| 353 if (is_ios) { |
| 354 rtc_source_set("fileutils_objc") { |
| 355 visibility = [ ":*" ] |
| 356 sources = [ |
| 357 "testsupport/iosfileutils.mm", |
| 358 ] |
| 359 deps = [ |
| 360 "..:webrtc_common", |
| 361 "../rtc_base:rtc_base_approved", |
| 362 "../sdk:objc_common", |
| 363 ] |
| 364 } |
| 365 } |
| 366 |
346 rtc_source_set("fileutils") { | 367 rtc_source_set("fileutils") { |
347 testonly = true | 368 testonly = true |
| 369 visibility = [ ":*" ] |
348 sources = [ | 370 sources = [ |
349 "testsupport/fileutils.cc", | 371 "testsupport/fileutils.cc", |
350 "testsupport/fileutils.h", | 372 "testsupport/fileutils.h", |
351 ] | 373 ] |
352 deps = [ | 374 deps = [ |
353 "..:webrtc_common", | 375 "..:webrtc_common", |
354 "../rtc_base:rtc_base_approved", | 376 "../rtc_base:rtc_base_approved", |
355 ] | 377 ] |
356 if (is_ios) { | 378 if (is_ios) { |
357 sources += [ "testsupport/iosfileutils.mm" ] | 379 deps += [ ":fileutils_objc" ] |
358 deps += [ "../sdk:objc_common" ] | |
359 } | 380 } |
360 if (is_win) { | 381 if (is_win) { |
361 deps += [ "../rtc_base:rtc_base" ] | 382 deps += [ "../rtc_base:rtc_base" ] |
362 } | 383 } |
363 visibility = [ ":*" ] | |
364 } | 384 } |
365 | 385 |
366 rtc_source_set("run_test") { | 386 rtc_source_set("run_test") { |
367 testonly = true | 387 testonly = true |
| 388 if (is_mac) { |
| 389 public_deps = [ |
| 390 ":run_test_objc", |
| 391 ] |
| 392 } else { |
| 393 public_deps = [ |
| 394 ":run_test_generic", |
| 395 ] |
| 396 } |
| 397 } |
| 398 |
| 399 rtc_source_set("run_test_interface") { |
| 400 testonly = true |
| 401 visibility = [ ":*" ] |
368 sources = [ | 402 sources = [ |
369 "run_test.h", | 403 "run_test.h", |
370 ] | 404 ] |
371 if (is_mac) { | 405 } |
372 sources += [ "mac/run_test.mm" ] | 406 |
373 } else { | 407 if (is_mac) { |
374 sources += [ "run_test.cc" ] | 408 rtc_source_set("run_test_objc") { |
| 409 testonly = true |
| 410 visibility = [ ":*" ] |
| 411 sources = [ |
| 412 "mac/run_test.mm", |
| 413 ] |
| 414 public_deps = [ |
| 415 ":run_test_interface", |
| 416 ] |
375 } | 417 } |
376 } | 418 } |
377 | 419 |
| 420 rtc_source_set("run_test_generic") { |
| 421 testonly = true |
| 422 visibility = [ ":*" ] |
| 423 sources = [ |
| 424 "run_test.cc", |
| 425 ] |
| 426 public_deps = [ |
| 427 ":run_test_interface", |
| 428 ] |
| 429 } |
| 430 |
378 rtc_source_set("fileutils_unittests") { | 431 rtc_source_set("fileutils_unittests") { |
379 testonly = true | 432 testonly = true |
380 visibility = [ ":*" ] # Only targets in this file can depend on this. | 433 visibility = [ ":*" ] # Only targets in this file can depend on this. |
381 sources = [ | 434 sources = [ |
382 "testsupport/fileutils_unittest.cc", | 435 "testsupport/fileutils_unittest.cc", |
383 ] | 436 ] |
384 deps = [ | 437 deps = [ |
385 ":fileutils", | 438 ":fileutils", |
386 ":test_support", | 439 ":test_support", |
387 "../rtc_base:rtc_base_approved", | 440 "../rtc_base:rtc_base_approved", |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 cflags = [ | 589 cflags = [ |
537 "-Wno-bool-conversion", | 590 "-Wno-bool-conversion", |
538 "-Wno-comment", | 591 "-Wno-comment", |
539 "-Wno-delete-non-virtual-dtor", | 592 "-Wno-delete-non-virtual-dtor", |
540 ] | 593 ] |
541 } | 594 } |
542 } | 595 } |
543 | 596 |
544 rtc_source_set("test_renderer") { | 597 rtc_source_set("test_renderer") { |
545 testonly = true | 598 testonly = true |
| 599 if (is_mac) { |
| 600 public_deps = [ |
| 601 ":test_renderer_objc", |
| 602 ] |
| 603 } else { |
| 604 public_deps = [ |
| 605 ":test_renderer_generic", |
| 606 ] |
| 607 } |
| 608 } |
| 609 |
| 610 if (is_mac) { |
| 611 rtc_source_set("test_renderer_objc") { |
| 612 testonly = true |
| 613 visibility = [ ":*" ] |
| 614 sources = [ |
| 615 "mac/video_renderer_mac.h", |
| 616 "mac/video_renderer_mac.mm", |
| 617 ] |
| 618 public_deps = [ |
| 619 ":test_renderer_generic", |
| 620 ] |
| 621 deps = [ |
| 622 "../rtc_base:rtc_base_approved", |
| 623 ] |
| 624 libs = [ |
| 625 "Cocoa.framework", |
| 626 "OpenGL.framework", |
| 627 "CoreVideo.framework", |
| 628 ] |
| 629 if (!build_with_chromium && is_clang) { |
| 630 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 631 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 632 } |
| 633 } |
| 634 } |
| 635 |
| 636 rtc_source_set("test_renderer_generic") { |
| 637 testonly = true |
| 638 visibility = [ ":*" ] |
546 libs = [] | 639 libs = [] |
547 sources = [ | 640 sources = [ |
548 "linux/glx_renderer.cc", | 641 "linux/glx_renderer.cc", |
549 "linux/glx_renderer.h", | 642 "linux/glx_renderer.h", |
550 "linux/video_renderer_linux.cc", | 643 "linux/video_renderer_linux.cc", |
551 "mac/video_renderer_mac.h", | |
552 "mac/video_renderer_mac.mm", | |
553 "video_renderer.cc", | 644 "video_renderer.cc", |
554 "video_renderer.h", | 645 "video_renderer.h", |
555 "win/d3d_renderer.cc", | 646 "win/d3d_renderer.cc", |
556 "win/d3d_renderer.h", | 647 "win/d3d_renderer.h", |
557 ] | 648 ] |
| 649 deps = [ |
| 650 ":test_support", |
| 651 "..:webrtc_common", |
| 652 "../common_video", |
| 653 "../modules/media_file", |
| 654 "../rtc_base:rtc_base_approved", |
| 655 "//testing/gtest", |
| 656 ] |
558 if (!is_linux && !is_mac && !is_win) { | 657 if (!is_linux && !is_mac && !is_win) { |
559 sources += [ "null_platform_renderer.cc" ] | 658 sources += [ "null_platform_renderer.cc" ] |
560 } | 659 } |
561 if (is_linux || is_mac) { | 660 if (is_linux || is_mac) { |
562 sources += [ | 661 sources += [ |
563 "gl/gl_renderer.cc", | 662 "gl/gl_renderer.cc", |
564 "gl/gl_renderer.h", | 663 "gl/gl_renderer.h", |
565 ] | 664 ] |
566 } | 665 } |
567 | 666 |
568 if (is_linux) { | 667 if (is_linux) { |
569 libs += [ | 668 libs += [ |
570 "Xext", | 669 "Xext", |
571 "X11", | 670 "X11", |
572 "GL", | 671 "GL", |
573 ] | 672 ] |
574 } | 673 } |
575 if (is_android) { | 674 if (is_android) { |
576 libs += [ | 675 libs += [ |
577 "GLESv2", | 676 "GLESv2", |
578 "log", | 677 "log", |
579 ] | 678 ] |
580 } | 679 } |
581 if (is_mac) { | |
582 libs = [ | |
583 "Cocoa.framework", | |
584 "OpenGL.framework", | |
585 "CoreVideo.framework", | |
586 ] | |
587 } | |
588 | 680 |
589 public_configs = [ ":test_renderer_exported_config" ] | 681 public_configs = [ ":test_renderer_exported_config" ] |
590 | 682 |
591 if (!build_with_chromium && is_clang) { | 683 if (!build_with_chromium && is_clang) { |
592 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 684 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
593 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 685 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
594 } | 686 } |
595 | |
596 deps = [ | |
597 ":test_support", | |
598 "..:webrtc_common", | |
599 "../common_video", | |
600 "../modules/media_file", | |
601 "../rtc_base:rtc_base_approved", | |
602 "//testing/gtest", | |
603 ] | |
604 } | 687 } |
605 | 688 |
606 rtc_source_set("audio_codec_mocks") { | 689 rtc_source_set("audio_codec_mocks") { |
607 testonly = true | 690 testonly = true |
608 sources = [ | 691 sources = [ |
609 "mock_audio_decoder.cc", | 692 "mock_audio_decoder.cc", |
610 "mock_audio_decoder.h", | 693 "mock_audio_decoder.h", |
611 "mock_audio_decoder_factory.h", | 694 "mock_audio_decoder_factory.h", |
612 "mock_audio_encoder.cc", | 695 "mock_audio_encoder.cc", |
613 "mock_audio_encoder.h", | 696 "mock_audio_encoder.h", |
(...skipping 15 matching lines...) Expand all Loading... |
629 java_files = [ | 712 java_files = [ |
630 "android/org/webrtc/native_test/RTCNativeUnitTest.java", | 713 "android/org/webrtc/native_test/RTCNativeUnitTest.java", |
631 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java", | 714 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java", |
632 ] | 715 ] |
633 deps = [ | 716 deps = [ |
634 "../rtc_base:base_java", | 717 "../rtc_base:base_java", |
635 "//testing/android/native_test:native_test_java", | 718 "//testing/android/native_test:native_test_java", |
636 ] | 719 ] |
637 } | 720 } |
638 } | 721 } |
OLD | NEW |