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

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

Issue 2614833004: GN: Refactor webrtc_nonparallel_tests and audio_tests to avoid crossing package boundaries. (Closed)
Patch Set: base -> rtc_base. Fixed some dependencies. Created 3 years, 11 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/audio/utility/BUILD.gn ('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 # 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/config/crypto.gni") 9 import("//build/config/crypto.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 if (is_asan) { 279 if (is_asan) {
280 if (current_cpu == "x64") { 280 if (current_cpu == "x64") {
281 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-x86_64.dll" ] 281 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-x86_64.dll" ]
282 } else { 282 } else {
283 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-i386.dll" ] 283 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-i386.dll" ]
284 } 284 }
285 } 285 }
286 } 286 }
287 } 287 }
288 288
289 if (rtc_include_tests) {
290 rtc_source_set("rtc_base_approved_unittests") {
291 testonly = true
292 sources = [
293 "array_view_unittest.cc",
294 "atomicops_unittest.cc",
295 "base64_unittest.cc",
296 "basictypes_unittest.cc",
297 "bind_unittest.cc",
298 "bitbuffer_unittest.cc",
299 "buffer_unittest.cc",
300 "bufferqueue_unittest.cc",
301 "bytebuffer_unittest.cc",
302 "byteorder_unittest.cc",
303 "copyonwritebuffer_unittest.cc",
304 "criticalsection_unittest.cc",
305 "event_tracer_unittest.cc",
306 "event_unittest.cc",
307 "file_unittest.cc",
308 "function_view_unittest.cc",
309 "logging_unittest.cc",
310 "md5digest_unittest.cc",
311 "mod_ops_unittest.cc",
312 "onetimeevent_unittest.cc",
313 "optional_unittest.cc",
314 "pathutils_unittest.cc",
315 "platform_thread_unittest.cc",
316 "random_unittest.cc",
317 "rate_limiter_unittest.cc",
318 "rate_statistics_unittest.cc",
319 "ratetracker_unittest.cc",
320 "refcountedobject_unittest.cc",
321 "safe_compare_unittest.cc",
322 "stringencode_unittest.cc",
323 "stringutils_unittest.cc",
324 "swap_queue_unittest.cc",
325
326 # TODO(ronghuawu): Reenable this test.
327 # "systeminfo_unittest.cc",
328 "thread_annotations_unittest.cc",
329 "thread_checker_unittest.cc",
330 "timestampaligner_unittest.cc",
331 "timeutils_unittest.cc",
332 ]
333 deps = [
334 ":rtc_base_approved",
335 ":rtc_base_tests_utils",
336 ]
337 if (!build_with_chromium && is_clang) {
338 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
339 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
340 }
341 }
342 }
343
344 config("enable_libevent_config") { 289 config("enable_libevent_config") {
345 defines = [ "WEBRTC_BUILD_LIBEVENT" ] 290 defines = [ "WEBRTC_BUILD_LIBEVENT" ]
346 } 291 }
347 292
348 rtc_static_library("rtc_task_queue") { 293 rtc_static_library("rtc_task_queue") {
349 public_deps = [ 294 public_deps = [
350 ":rtc_base_approved", 295 ":rtc_base_approved",
351 ] 296 ]
352 297
353 sources = [ 298 sources = [
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 "task_queue_posix.cc", 332 "task_queue_posix.cc",
388 ] 333 ]
389 } 334 }
390 if (is_win) { 335 if (is_win) {
391 sources += [ "task_queue_win.cc" ] 336 sources += [ "task_queue_win.cc" ]
392 } 337 }
393 } 338 }
394 } 339 }
395 } 340 }
396 341
397 if (rtc_include_tests) {
398 rtc_source_set("rtc_task_queue_unittests") {
399 testonly = true
400 sources = [
401 "sequenced_task_checker_unittest.cc",
402 "task_queue_unittest.cc",
403 "weak_ptr_unittest.cc",
404 ]
405 deps = [
406 ":rtc_base_tests_utils",
407 ":rtc_task_queue",
408 ]
409 if (!build_with_chromium && is_clang) {
410 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
411 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
412 }
413 }
414 }
415
416 rtc_static_library("rtc_analytics") { 342 rtc_static_library("rtc_analytics") {
417 sources = [ 343 sources = [
418 "analytics/exp_filter.cc", 344 "analytics/exp_filter.cc",
419 "analytics/exp_filter.h", 345 "analytics/exp_filter.h",
420 "analytics/percentile_filter.h", 346 "analytics/percentile_filter.h",
421 ] 347 ]
422 deps = [ 348 deps = [
423 ":rtc_base_approved", 349 ":rtc_base_approved",
424 ] 350 ]
425 } 351 }
426 352
427 if (rtc_include_tests) {
428 rtc_source_set("rtc_analytics_unittests") {
429 testonly = true
430 sources = [
431 "analytics/exp_filter_unittest.cc",
432 "analytics/percentile_filter_unittest.cc",
433 ]
434 deps = [
435 ":rtc_analytics",
436 ":rtc_base_tests_utils",
437 ]
438 }
439 }
440
441 config("rtc_base_warnings_config") { 353 config("rtc_base_warnings_config") {
442 if (is_win && is_clang) { 354 if (is_win && is_clang) {
443 cflags = [ 355 cflags = [
444 # Disable warnings failing when compiling with Clang on Windows. 356 # Disable warnings failing when compiling with Clang on Windows.
445 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 357 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
446 "-Wno-sign-compare", 358 "-Wno-sign-compare",
447 "-Wno-missing-braces", 359 "-Wno-missing-braces",
448 ] 360 ]
449 } 361 }
450 } 362 }
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] 680 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
769 defines += [ "timezone=_timezone" ] 681 defines += [ "timezone=_timezone" ]
770 sources -= [ "ifaddrs_converter.cc" ] 682 sources -= [ "ifaddrs_converter.cc" ]
771 } 683 }
772 if (is_win && is_clang) { 684 if (is_win && is_clang) {
773 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 685 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
774 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 686 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
775 } 687 }
776 } 688 }
777 689
690 rtc_source_set("gtest_prod") {
691 sources = [
692 "gtest_prod_util.h",
693 ]
694 }
695
778 if (rtc_include_tests) { 696 if (rtc_include_tests) {
697 config("rtc_base_tests_utils_exported_config") {
698 defines = [ "GTEST_RELATIVE_PATH" ]
699 }
700
701 config("rtc_base_tests_utils_warnings_config") {
702 if (is_win && is_clang) {
703 cflags = [
704 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
705 "-Wno-reorder",
706 "-Wno-sign-compare",
707 ]
708 }
709 }
710
711 rtc_source_set("rtc_base_tests_utils") {
712 testonly = true
713 sources = [
714 # Also use this as a convenient dumping ground for misc files that are
715 # included by multiple targets below.
716 "fakeclock.cc",
717 "fakeclock.h",
718 "fakenetwork.h",
719 "fakesslidentity.h",
720 "faketaskrunner.h",
721 "firewallsocketserver.cc",
722 "firewallsocketserver.h",
723 "gunit.h",
724 "natserver.cc",
725 "natserver.h",
726 "natsocketfactory.cc",
727 "natsocketfactory.h",
728 "nattypes.cc",
729 "nattypes.h",
730 "sigslottester.h",
731 "sigslottester.h.pump",
732 "testbase64.h",
733 "testechoserver.h",
734 "testutils.h",
735 "timedelta.h",
736 "unittest_main.cc",
737 ]
738 configs += [ ":rtc_base_tests_utils_warnings_config" ]
739 public_configs = [ ":rtc_base_tests_utils_exported_config" ]
740 deps = [
741 ":rtc_base",
742 "../test:field_trial",
743 "../test:test_support",
744 ]
745 public_deps = [
746 "//testing/gmock",
747 "//testing/gtest",
748 ]
749
750 if (!build_with_chromium && is_clang) {
751 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
752 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
753 }
754 }
755
756 rtc_source_set("rtc_base_nonparallel_tests") {
757 testonly = true
758 sources = [
759 "nullsocketserver_unittest.cc",
760 "physicalsocketserver_unittest.cc",
761 "socket_unittest.cc",
762 "socket_unittest.h",
763 "socketaddress_unittest.cc",
764 "virtualsocket_unittest.cc",
765 ]
766 deps = [
767 ":rtc_base",
768 ":rtc_base_tests_utils",
769 "//testing/gtest",
770 ]
771 if (is_win) {
772 sources += [ "win32socketserver_unittest.cc" ]
773 }
774
775 if (!build_with_chromium && is_clang) {
776 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
777 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
778 }
779 }
780
781 rtc_source_set("rtc_base_approved_unittests") {
782 testonly = true
783 sources = [
784 "array_view_unittest.cc",
785 "atomicops_unittest.cc",
786 "base64_unittest.cc",
787 "basictypes_unittest.cc",
788 "bind_unittest.cc",
789 "bitbuffer_unittest.cc",
790 "buffer_unittest.cc",
791 "bufferqueue_unittest.cc",
792 "bytebuffer_unittest.cc",
793 "byteorder_unittest.cc",
794 "copyonwritebuffer_unittest.cc",
795 "criticalsection_unittest.cc",
796 "event_tracer_unittest.cc",
797 "event_unittest.cc",
798 "file_unittest.cc",
799 "function_view_unittest.cc",
800 "logging_unittest.cc",
801 "md5digest_unittest.cc",
802 "mod_ops_unittest.cc",
803 "onetimeevent_unittest.cc",
804 "optional_unittest.cc",
805 "pathutils_unittest.cc",
806 "platform_thread_unittest.cc",
807 "random_unittest.cc",
808 "rate_limiter_unittest.cc",
809 "rate_statistics_unittest.cc",
810 "ratetracker_unittest.cc",
811 "refcountedobject_unittest.cc",
812 "safe_compare_unittest.cc",
813 "stringencode_unittest.cc",
814 "stringutils_unittest.cc",
815 "swap_queue_unittest.cc",
816
817 # TODO(ronghuawu): Reenable this test.
818 # "systeminfo_unittest.cc",
819 "thread_annotations_unittest.cc",
820 "thread_checker_unittest.cc",
821 "timestampaligner_unittest.cc",
822 "timeutils_unittest.cc",
823 ]
824 deps = [
825 ":rtc_base_approved",
826 ":rtc_base_tests_utils",
827 ]
828 if (!build_with_chromium && is_clang) {
829 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
830 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
831 }
832 }
833
834 rtc_source_set("rtc_task_queue_unittests") {
835 testonly = true
836 sources = [
837 "sequenced_task_checker_unittest.cc",
838 "task_queue_unittest.cc",
839 "weak_ptr_unittest.cc",
840 ]
841 deps = [
842 ":rtc_base_tests_utils",
843 ":rtc_task_queue",
844 ]
845 if (!build_with_chromium && is_clang) {
846 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
847 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
848 }
849 }
850
851 rtc_source_set("rtc_analytics_unittests") {
852 testonly = true
853 sources = [
854 "analytics/exp_filter_unittest.cc",
855 "analytics/percentile_filter_unittest.cc",
856 ]
857 deps = [
858 ":rtc_analytics",
859 ":rtc_base_tests_utils",
860 ]
861 }
862
779 config("rtc_base_unittests_config") { 863 config("rtc_base_unittests_config") {
780 if (is_clang) { 864 if (is_clang) {
781 cflags = [ "-Wno-unused-const-variable" ] 865 cflags = [ "-Wno-unused-const-variable" ]
782 } 866 }
783 } 867 }
784 rtc_source_set("rtc_base_unittests") { 868 rtc_source_set("rtc_base_unittests") {
785 testonly = true 869 testonly = true
786 sources = [ 870 sources = [
787 "autodetectproxy_unittest.cc", 871 "autodetectproxy_unittest.cc",
788 "callback_unittest.cc", 872 "callback_unittest.cc",
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 ":rtc_base", 923 ":rtc_base",
840 ] 924 ]
841 configs += [ ":rtc_base_unittests_config" ] 925 configs += [ ":rtc_base_unittests_config" ]
842 if (!build_with_chromium && is_clang) { 926 if (!build_with_chromium && is_clang) {
843 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 927 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
844 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 928 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
845 } 929 }
846 } 930 }
847 } 931 }
848 932
849 rtc_source_set("gtest_prod") {
850 sources = [
851 "gtest_prod_util.h",
852 ]
853 }
854
855 if (rtc_include_tests) {
856 config("rtc_base_tests_utils_exported_config") {
857 defines = [ "GTEST_RELATIVE_PATH" ]
858 }
859
860 config("rtc_base_tests_utils_warnings_config") {
861 if (is_win && is_clang) {
862 cflags = [
863 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
864 "-Wno-reorder",
865 "-Wno-sign-compare",
866 ]
867 }
868 }
869
870 rtc_source_set("rtc_base_tests_utils") {
871 testonly = true
872 sources = [
873 # Also use this as a convenient dumping ground for misc files that are
874 # included by multiple targets below.
875 "fakeclock.cc",
876 "fakeclock.h",
877 "fakenetwork.h",
878 "fakesslidentity.h",
879 "faketaskrunner.h",
880 "firewallsocketserver.cc",
881 "firewallsocketserver.h",
882 "gunit.h",
883 "natserver.cc",
884 "natserver.h",
885 "natsocketfactory.cc",
886 "natsocketfactory.h",
887 "nattypes.cc",
888 "nattypes.h",
889 "sigslottester.h",
890 "sigslottester.h.pump",
891 "testbase64.h",
892 "testechoserver.h",
893 "testutils.h",
894 "timedelta.h",
895 "unittest_main.cc",
896 ]
897 configs += [ ":rtc_base_tests_utils_warnings_config" ]
898 public_configs = [ ":rtc_base_tests_utils_exported_config" ]
899 deps = [
900 ":rtc_base",
901 "../test:field_trial",
902 "../test:test_support",
903 ]
904 public_deps = [
905 "//testing/gmock",
906 "//testing/gtest",
907 ]
908
909 if (!build_with_chromium && is_clang) {
910 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
911 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
912 }
913 }
914 }
915
916 if (is_android) { 933 if (is_android) {
917 android_library("base_java") { 934 android_library("base_java") {
918 java_files = [ 935 java_files = [
919 "java/src/org/webrtc/Logging.java", 936 "java/src/org/webrtc/Logging.java",
920 "java/src/org/webrtc/Size.java", 937 "java/src/org/webrtc/Size.java",
921 "java/src/org/webrtc/ThreadUtils.java", 938 "java/src/org/webrtc/ThreadUtils.java",
922 ] 939 ]
923 940
924 deps = [ 941 deps = [
925 "//base:base_java", 942 "//base:base_java",
926 ] 943 ]
927 } 944 }
928 } 945 }
OLDNEW
« no previous file with comments | « webrtc/audio/utility/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698