Commit f9e001f4 authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Prevent downstream media targets from appearing in upstream chromium builds.

This CL adds a gn arg enable_downstream_media_tests, which downstream consumers
of chromium can set to make these builds appear. This prevents building and
isolate generation [which fails] in upstream chromium builds that try to
build/isolate all targets.

Bug: 876915
Change-Id: Ic0f892680e889a5cd5d92b8853800a3c08926a9b
Reviewed-on: https://chromium-review.googlesource.com/1186102Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585357}
parent 35738513
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
declare_args() {
# Many of the targets defined in this file have dependencies that cannot be
# satisfied without additional downstream resources. Explicitly guard them
# them behind this flag so that we do not attempt to build or isolate targets
# in public chromium checkouts.
enable_downstream_media_tests = false
}
source_set("browser_tests") { source_set("browser_tests") {
testonly = true testonly = true
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
...@@ -66,7 +74,8 @@ copy("browser_test_resources") { ...@@ -66,7 +74,8 @@ copy("browser_test_resources") {
# Run separately from the Chromium waterfall with the external component # Run separately from the Chromium waterfall with the external component
# extension. See README.md # extension. See README.md
group("media_router_e2e_tests") { if (enable_downstream_media_tests) {
group("media_router_e2e_tests") {
testonly = true testonly = true
data_deps = [ data_deps = [
":browser_test_resources", ":browser_test_resources",
...@@ -77,6 +86,7 @@ group("media_router_e2e_tests") { ...@@ -77,6 +86,7 @@ group("media_router_e2e_tests") {
"$root_out_dir/mr_extension/", "$root_out_dir/mr_extension/",
"internal/", "internal/",
] ]
}
} }
copy("e2e_test_resources") { copy("e2e_test_resources") {
...@@ -91,7 +101,8 @@ copy("e2e_test_resources") { ...@@ -91,7 +101,8 @@ copy("e2e_test_resources") {
} }
# Run separately. TODO: Documentation on how to run # Run separately. TODO: Documentation on how to run
group("swarming_tests") { if (enable_downstream_media_tests) {
group("swarming_tests") {
testonly = true testonly = true
data_deps = [ data_deps = [
":browser_test_resources", ":browser_test_resources",
...@@ -101,6 +112,7 @@ group("swarming_tests") { ...@@ -101,6 +112,7 @@ group("swarming_tests") {
"internal/", "internal/",
"$root_out_dir/mr_extension/", "$root_out_dir/mr_extension/",
] ]
}
} }
source_set("test_support") { source_set("test_support") {
...@@ -129,7 +141,8 @@ source_set("test_support") { ...@@ -129,7 +141,8 @@ source_set("test_support") {
] ]
} }
group("media_router_perf_tests") { if (enable_downstream_media_tests) {
group("media_router_perf_tests") {
testonly = true testonly = true
data = [ data = [
"$root_out_dir/media_router/telemetry_extension/", "$root_out_dir/media_router/telemetry_extension/",
...@@ -143,6 +156,7 @@ group("media_router_perf_tests") { ...@@ -143,6 +156,7 @@ group("media_router_perf_tests") {
data_deps = [ data_deps = [
":telemetry_extension_resources", ":telemetry_extension_resources",
] ]
}
} }
copy("telemetry_extension_resources") { copy("telemetry_extension_resources") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment