Index: media/BUILD.gn |
diff --git a/media/BUILD.gn b/media/BUILD.gn |
index e723369f30b9b08d5b3acb50a03d1869cf62a787..79656b2986cb6ec72da7d461b3de49e820e56902 100644 |
--- a/media/BUILD.gn |
+++ b/media/BUILD.gn |
@@ -518,7 +518,9 @@ static_library("cdm_paths") { |
] |
} |
-test("media_unittests") { |
+# TODO(xhwang): Move these into source_sets in respective subfolders. |
+source_set("unit_tests") { |
+ testonly = true |
sources = [ |
"cdm/aes_decryptor_unittest.cc", |
"cdm/external_clear_key_test_helper.cc", |
@@ -599,9 +601,9 @@ test("media_unittests") { |
"//gpu:test_support", |
"//gpu/command_buffer/common", |
"//media/audio:test_support", |
- "//media/audio:unittests", |
+ "//media/audio:unit_tests", |
"//media/base:test_support", |
- "//media/base:unittests", |
+ "//media/base:unit_tests", |
"//media/test:pipeline_integration_tests", |
"//ppapi/features", |
"//skia", # Direct dependency required to inherit config. |
@@ -623,12 +625,12 @@ test("media_unittests") { |
] |
deps += [ |
"//media/base/android:media_java", |
- "//media/base/android:unittests", |
+ "//media/base/android:unit_tests", |
"//ui/android:ui_java", |
] |
} |
if (is_mac || is_ios) { |
- deps += [ "//media/base/mac:unittests" ] |
+ deps += [ "//media/base/mac:unit_tests" ] |
} |
# If ExternalClearKey is built, we can test CdmAdapter. |
@@ -706,18 +708,32 @@ test("media_unittests") { |
] |
} |
- # include_dirs += [ |
- # # Needed by media_drm_bridge.cc. |
- # target_gen_dir, |
- # ], |
- |
configs += [ ":media_config" ] |
if (media_use_ffmpeg) { |
- deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit config. |
+ # Direct dependency required to inherit config. |
+ deps += [ "//third_party/ffmpeg" ] |
} |
} |
+# Contains tests for the "media" target, including subfolders "base", "cdm", |
+# "filters", "format", "renderer", etc. |
+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
|
+ deps = [ |
+ ":unit_tests", |
+ "//media/test:run_all_unittests", |
+ ] |
+} |
+ |
+# 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.
|
+# TODO(xhwang): Move mojo/capture/remoting tests here where applicable. |
+test("media_unittests") { |
+ deps = [ |
+ ":unit_tests", |
+ "//media/test:run_all_unittests", |
+ ] |
+} |
+ |
test("media_perftests") { |
configs += [ ":media_config" ] |
deps = [ |
@@ -736,7 +752,8 @@ test("media_perftests") { |
"//ui/gfx:test_support", |
] |
if (media_use_ffmpeg) { |
- deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit config. |
+ # Direct dependency required to inherit config. |
+ deps += [ "//third_party/ffmpeg" ] |
} |
# This target should not require the Chrome executable to run. |
@@ -750,14 +767,12 @@ test("media_perftests") { |
# For running the subset of media_unittests that might require audio hardware |
# separately on GPU bots. media_unittests includes these too. |
test("audio_unittests") { |
- sources = [ |
- "base/run_all_unittests.cc", |
- ] |
deps = [ |
":test_support", |
"//base/test:test_support", |
- "//media/audio:unittests", |
+ "//media/audio:unit_tests", |
"//media/base:test_support", |
+ "//media/test:run_all_unittests", |
"//ui/gfx:test_support", |
] |
} |