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

Side by Side Diff: media/BUILD.gn

Issue 2426773005: media: Reorganize media unittests (Closed)
Patch Set: Created 4 years, 2 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 | media/audio/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/buildflag_header.gni") 5 import("//build/buildflag_header.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/arm.gni") 7 import("//build/config/arm.gni")
8 import("//build/config/features.gni") 8 import("//build/config/features.gni")
9 import("//build/config/linux/pkg_config.gni") 9 import("//build/config/linux/pkg_config.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 static_library("cdm_paths") { 511 static_library("cdm_paths") {
512 sources = [ 512 sources = [
513 "cdm/cdm_paths.cc", 513 "cdm/cdm_paths.cc",
514 "cdm/cdm_paths.h", 514 "cdm/cdm_paths.h",
515 ] 515 ]
516 deps = [ 516 deps = [
517 "//base", 517 "//base",
518 ] 518 ]
519 } 519 }
520 520
521 test("media_unittests") { 521 # TODO(xhwang): Move these into source_sets in respective subfolders.
522 source_set("unit_tests") {
523 testonly = true
522 sources = [ 524 sources = [
523 "cdm/aes_decryptor_unittest.cc", 525 "cdm/aes_decryptor_unittest.cc",
524 "cdm/external_clear_key_test_helper.cc", 526 "cdm/external_clear_key_test_helper.cc",
525 "cdm/external_clear_key_test_helper.h", 527 "cdm/external_clear_key_test_helper.h",
526 "cdm/json_web_key_unittest.cc", 528 "cdm/json_web_key_unittest.cc",
527 "cdm/simple_cdm_allocator.cc", 529 "cdm/simple_cdm_allocator.cc",
528 "cdm/simple_cdm_allocator.h", 530 "cdm/simple_cdm_allocator.h",
529 "cdm/simple_cdm_allocator_unittest.cc", 531 "cdm/simple_cdm_allocator_unittest.cc",
530 "cdm/simple_cdm_buffer.cc", 532 "cdm/simple_cdm_buffer.cc",
531 "cdm/simple_cdm_buffer.h", 533 "cdm/simple_cdm_buffer.h",
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 594
593 deps = [ 595 deps = [
594 ":cdm_api", 596 ":cdm_api",
595 ":cdm_paths", 597 ":cdm_paths",
596 ":media", 598 ":media",
597 ":test_support", 599 ":test_support",
598 "//base/test:test_support", 600 "//base/test:test_support",
599 "//gpu:test_support", 601 "//gpu:test_support",
600 "//gpu/command_buffer/common", 602 "//gpu/command_buffer/common",
601 "//media/audio:test_support", 603 "//media/audio:test_support",
602 "//media/audio:unittests", 604 "//media/audio:unit_tests",
603 "//media/base:test_support", 605 "//media/base:test_support",
604 "//media/base:unittests", 606 "//media/base:unit_tests",
605 "//media/test:pipeline_integration_tests", 607 "//media/test:pipeline_integration_tests",
606 "//ppapi/features", 608 "//ppapi/features",
607 "//skia", # Direct dependency required to inherit config. 609 "//skia", # Direct dependency required to inherit config.
608 "//testing/gmock", 610 "//testing/gmock",
609 "//testing/gtest", 611 "//testing/gtest",
610 "//third_party/libwebm", 612 "//third_party/libwebm",
611 "//third_party/libyuv", 613 "//third_party/libyuv",
612 "//third_party/widevine/cdm:headers", 614 "//third_party/widevine/cdm:headers",
613 "//ui/gfx:test_support", 615 "//ui/gfx:test_support",
614 "//url", 616 "//url",
615 ] 617 ]
616 618
617 data_deps = [] 619 data_deps = []
618 620
619 if (is_android) { 621 if (is_android) {
620 sources -= [ 622 sources -= [
621 "filters/decrypting_audio_decoder_unittest.cc", 623 "filters/decrypting_audio_decoder_unittest.cc",
622 "filters/decrypting_video_decoder_unittest.cc", 624 "filters/decrypting_video_decoder_unittest.cc",
623 ] 625 ]
624 deps += [ 626 deps += [
625 "//media/base/android:media_java", 627 "//media/base/android:media_java",
626 "//media/base/android:unittests", 628 "//media/base/android:unit_tests",
627 "//ui/android:ui_java", 629 "//ui/android:ui_java",
628 ] 630 ]
629 } 631 }
630 if (is_mac || is_ios) { 632 if (is_mac || is_ios) {
631 deps += [ "//media/base/mac:unittests" ] 633 deps += [ "//media/base/mac:unit_tests" ]
632 } 634 }
633 635
634 # If ExternalClearKey is built, we can test CdmAdapter. 636 # If ExternalClearKey is built, we can test CdmAdapter.
635 if (enable_pepper_cdms) { 637 if (enable_pepper_cdms) {
636 sources += [ "cdm/cdm_adapter_unittest.cc" ] 638 sources += [ "cdm/cdm_adapter_unittest.cc" ]
637 data_deps += [ "//media/cdm/ppapi:clearkeycdm" ] 639 data_deps += [ "//media/cdm/ppapi:clearkeycdm" ]
638 } 640 }
639 641
640 if (media_use_ffmpeg) { 642 if (media_use_ffmpeg) {
641 deps += [ "//media/ffmpeg:ffmpeg_unittests" ] 643 deps += [ "//media/ffmpeg:ffmpeg_unittests" ]
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 701 }
700 } 702 }
701 703
702 if (is_mac || is_ios) { 704 if (is_mac || is_ios) {
703 libs = [ 705 libs = [
704 "AppKit.framework", 706 "AppKit.framework",
705 "Foundation.framework", 707 "Foundation.framework",
706 ] 708 ]
707 } 709 }
708 710
709 # include_dirs += [
710 # # Needed by media_drm_bridge.cc.
711 # target_gen_dir,
712 # ],
713
714 configs += [ ":media_config" ] 711 configs += [ ":media_config" ]
715 712
716 if (media_use_ffmpeg) { 713 if (media_use_ffmpeg) {
717 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit config. 714 # Direct dependency required to inherit config.
715 deps += [ "//third_party/ffmpeg" ]
718 } 716 }
719 } 717 }
720 718
719 # Contains tests for the "media" target, including subfolders "base", "cdm",
720 # "filters", "format", "renderer", etc.
721 test("media_base_unittests") {
watk 2016/10/18 23:42:22 I only have nits/discussion points: * I don't lov
xhwang 2016/10/20 16:33:09 Agreed. But I don't like media_core_unittests sinc
watk 2016/10/20 21:24:20 Sounds good. I prefer not having a target for an u
722 deps = [
723 ":unit_tests",
724 "//media/test:run_all_unittests",
725 ]
726 }
727
728 # Contains tests for all targets in "media" folder.
watk 2016/10/18 23:42:22 s/in "media"/in the "media"/
xhwang 2016/10/20 16:33:09 Done.
729 # TODO(xhwang): Move mojo/capture/remoting tests here where applicable.
730 test("media_unittests") {
731 deps = [
732 ":unit_tests",
733 "//media/test:run_all_unittests",
734 ]
735 }
736
721 test("media_perftests") { 737 test("media_perftests") {
722 configs += [ ":media_config" ] 738 configs += [ ":media_config" ]
723 deps = [ 739 deps = [
724 ":media", 740 ":media",
725 ":shared_memory_support", 741 ":shared_memory_support",
726 ":test_support", 742 ":test_support",
727 "//base/test:test_support", 743 "//base/test:test_support",
728 "//media/audio:test_support", 744 "//media/audio:test_support",
729 "//media/base:perftests", 745 "//media/base:perftests",
730 "//media/base:test_support", 746 "//media/base:test_support",
731 "//media/test:pipeline_integration_perftests", 747 "//media/test:pipeline_integration_perftests",
732 "//testing/gmock", 748 "//testing/gmock",
733 "//testing/gtest", 749 "//testing/gtest",
734 "//testing/perf", 750 "//testing/perf",
735 "//third_party/widevine/cdm:headers", 751 "//third_party/widevine/cdm:headers",
736 "//ui/gfx:test_support", 752 "//ui/gfx:test_support",
737 ] 753 ]
738 if (media_use_ffmpeg) { 754 if (media_use_ffmpeg) {
739 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit config. 755 # Direct dependency required to inherit config.
756 deps += [ "//third_party/ffmpeg" ]
740 } 757 }
741 758
742 # This target should not require the Chrome executable to run. 759 # This target should not require the Chrome executable to run.
743 assert_no_deps = [ "//chrome" ] 760 assert_no_deps = [ "//chrome" ]
744 761
745 data = [ 762 data = [
746 "test/data/", 763 "test/data/",
747 ] 764 ]
748 } 765 }
749 766
750 # For running the subset of media_unittests that might require audio hardware 767 # For running the subset of media_unittests that might require audio hardware
751 # separately on GPU bots. media_unittests includes these too. 768 # separately on GPU bots. media_unittests includes these too.
752 test("audio_unittests") { 769 test("audio_unittests") {
753 sources = [
754 "base/run_all_unittests.cc",
755 ]
756 deps = [ 770 deps = [
757 ":test_support", 771 ":test_support",
758 "//base/test:test_support", 772 "//base/test:test_support",
759 "//media/audio:unittests", 773 "//media/audio:unit_tests",
760 "//media/base:test_support", 774 "//media/base:test_support",
775 "//media/test:run_all_unittests",
761 "//ui/gfx:test_support", 776 "//ui/gfx:test_support",
762 ] 777 ]
763 } 778 }
764 779
765 static_library("test_support") { 780 static_library("test_support") {
766 testonly = true 781 testonly = true
767 sources = [ 782 sources = [
768 "renderers/mock_gpu_memory_buffer_video_frame_pool.cc", 783 "renderers/mock_gpu_memory_buffer_video_frame_pool.cc",
769 "renderers/mock_gpu_memory_buffer_video_frame_pool.h", 784 "renderers/mock_gpu_memory_buffer_video_frame_pool.h",
770 "renderers/mock_gpu_video_accelerator_factories.cc", 785 "renderers/mock_gpu_video_accelerator_factories.cc",
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 fuzzer_test("media_webm_muxer_fuzzer") { 919 fuzzer_test("media_webm_muxer_fuzzer") {
905 sources = [ 920 sources = [
906 "muxers/webm_muxer_fuzzertest.cc", 921 "muxers/webm_muxer_fuzzertest.cc",
907 ] 922 ]
908 deps = [ 923 deps = [
909 ":media", 924 ":media",
910 "//base", 925 "//base",
911 "//third_party/libwebm", 926 "//third_party/libwebm",
912 ] 927 ]
913 } 928 }
OLDNEW
« no previous file with comments | « no previous file | media/audio/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698