| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config.gni") |
| import("//build/host.gni") |
| import("//build/packages/prebuilt_test_manifest.gni") |
| import("//build/testing/host_test_data.gni") |
| import("//src/lib/icu/tzdata/icu_tzdata_config_data.gni") |
| import("build_args.gni") |
| import("generate_flavors.gni") |
| |
| # This target is provided for use by the //src:src target. Dependencies on |
| # Chromium-supplied packages should refer explicitly to the desired package. |
| group("chromium") { |
| public_deps = [ |
| ":web_engine", |
| ":web_runner", |
| ] |
| } |
| |
| group("web_engine") { |
| deps = [ |
| ":tzdata_for_web_engine", |
| ":web_engine_config", |
| ":web_engine_pkg", |
| ] |
| } |
| |
| prebuilt_archive_base_path = "//prebuilt/third_party/chromium" |
| debug_archive_base_path = "//prebuilt/build_ids/" + target_cpu + "/chromium" |
| |
| # TODO(fxbug.dev/70573): Remove when use_chromium_canary is deprecated. |
| if (use_chromium_canary) { |
| package_flavor_selections += [ |
| { |
| name = "web_engine_pkg" |
| flavor = "canary" |
| }, |
| { |
| name = "web_runner_pkg" |
| flavor = "canary" |
| }, |
| ] |
| } |
| |
| if (chromium_build_dir != "") { |
| package_flavor_selections += [ |
| { |
| name = "web_engine_pkg" |
| flavor = "custom" |
| }, |
| { |
| name = "web_runner_pkg" |
| flavor = "custom" |
| }, |
| ] |
| } |
| |
| generate_pkg_and_config("web_engine") { |
| prebuilt_archive_base_path = prebuilt_archive_base_path |
| debug_archive_base_path = debug_archive_base_path |
| custom_package_path = "/gen/fuchsia/engine/web_engine/web_engine.far" |
| selections = package_flavor_selections |
| |
| # Config data arguments. |
| for_pkg = "sysmgr" |
| sources = [ rebase_path("config/web_context_provider.config") ] |
| } |
| |
| group("web_runner") { |
| deps = [ |
| ":web_runner_config", |
| ":web_runner_pkg", |
| ] |
| } |
| |
| generate_pkg_and_config("web_runner") { |
| prebuilt_archive_base_path = prebuilt_archive_base_path |
| debug_archive_base_path = debug_archive_base_path |
| custom_package_path = "/gen/fuchsia/runners/web_runner/web_runner.far" |
| selections = package_flavor_selections |
| |
| # Config data arguments. |
| for_pkg = "appmgr" |
| sources = [ rebase_path("config/http_scheme_map.config") ] |
| outputs = [ "scheme_map/http.config" ] |
| } |
| |
| icu_tzdata_config_data("tzdata_for_web_engine") { |
| for_pkg = "web_engine" |
| } |
| |
| if (is_host) { |
| copy("chromedriver") { |
| outputs = [ "$host_tools_dir/chromedriver" ] |
| if (use_chromium_canary) { |
| sources = [ |
| "//prebuilt/third_party/chromedriver_latest/linux-x64/chromedriver", |
| ] |
| } else { |
| sources = [ "//prebuilt/third_party/chromedriver/linux-x64/chromedriver" ] |
| } |
| } |
| } else { |
| # Prebuilt FAR tests |
| test_env = [ nuc_env ] |
| |
| group("chromium_tests_group") { |
| testonly = true |
| deps = [ |
| ":chromium_tests", |
| |
| # The targets below have exactly the same contents, so will not be taking |
| # extra storage in configurations that use them both. |
| ":tzdata_for_base_unittests", |
| ":tzdata_for_chromium_tests_base_unittests", |
| ":tzdata_for_media_unittests", |
| ] |
| } |
| |
| # The specific tests binaries are specified by the "tests" target in |
| # https://source.chromium.org/chromium/chromium/src/+/master:fuchsia/cipd/BUILD.gn. |
| prebuilt_test_manifest("chromium_tests") { |
| if (use_chromium_canary) { |
| archive_dir = "//prebuilt/third_party/chromium_tests_latest/arch/x64" |
| } else { |
| archive_dir = "//prebuilt/third_party/chromium_tests/arch/x64" |
| } |
| environments = test_env |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| |
| icu_tzdata_config_data("tzdata_for_chromium_tests_base_unittests") { |
| for_pkg = "chromium_tests_base_unittests" |
| testonly = true |
| } |
| |
| icu_tzdata_config_data("tzdata_for_base_unittests") { |
| for_pkg = "base_unittests" |
| testonly = true |
| } |
| |
| icu_tzdata_config_data("tzdata_for_media_unittests") { |
| for_pkg = "media_unittests" |
| testonly = true |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":chromium_tests_group", |
| ":web_engine", |
| ":web_runner", |
| "web_runner_tests:tests", |
| "//src/fonts:downstream_test_deps", |
| ] |
| } |
| } |