blob: 470a0f339a62b1b311e7e251358161e89c997da6 [file] [log] [blame]
# 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_package.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")
declare_args() {
# Set to use the most recent canary version of prebuilt Chromium components
# otherwise the most recently validated version is used.
use_chromium_canary = false
}
# 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"
if (use_chromium_canary) {
prebuilt_archive_base_path += "_latest"
debug_archive_base_path += "_latest"
}
config_data("web_engine_config") {
visibility = [ ":web_engine" ]
for_pkg = "sysmgr"
sources = [ rebase_path("config/web_context_provider.config") ]
}
prebuilt_package("web_engine_pkg") {
visibility = [ ":web_engine" ]
package_name = "web_engine"
archive =
prebuilt_archive_base_path + "/arch/" + target_cpu + "/web_engine.far"
if (chromium_build_dir != "") {
archive =
chromium_build_dir + "/gen/fuchsia/engine/web_engine/web_engine.far"
}
debug_archive = debug_archive_base_path + "/web_engine.symbols.tar.bz2"
}
group("web_runner") {
deps = [
":web_runner_config",
":web_runner_pkg",
]
}
config_data("web_runner_config") {
visibility = [ ":web_runner" ]
for_pkg = "appmgr"
sources = [ rebase_path("config/http_scheme_map.config") ]
outputs = [ "scheme_map/http.config" ]
}
prebuilt_package("web_runner_pkg") {
visibility = [ ":web_runner" ]
package_name = "web_runner"
archive =
prebuilt_archive_base_path + "/arch/" + target_cpu + "/web_runner.far"
if (chromium_build_dir != "") {
archive =
chromium_build_dir + "/gen/fuchsia/runners/web_runner/web_runner.far"
}
debug_archive = debug_archive_base_path + "/web_runner.symbols.tar.bz2"
}
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",
]
}
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",
]
}
}