Commit 0c7e87fa authored by Fabrice de Gans-Riberi's avatar Fabrice de Gans-Riberi Committed by Commit Bot

[fuchsia] Directly publish the output package to its final location.

This skips a file copy.
Bug: 973159

Change-Id: Idb3883c7afec3ad1b6725ff0b47f9640c3bc8c19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1776608
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691867}
parent 4e8f4a61
...@@ -40,13 +40,12 @@ template("fuchsia_package") { ...@@ -40,13 +40,12 @@ template("fuchsia_package") {
_build_ids_file = "$_pkg_out_dir/ids.txt" _build_ids_file = "$_pkg_out_dir/ids.txt"
_component_manifest = "$_pkg_out_dir/${pkg.package_name}.cmx" _component_manifest = "$_pkg_out_dir/${pkg.package_name}.cmx"
_meta_far_file = "$_pkg_out_dir/meta.far" _meta_far_file = "$_pkg_out_dir/meta.far"
_combined_far_file = "$_pkg_out_dir/${pkg.package_name}-0.far" _package_far_file = "$_pkg_out_dir/${pkg.package_name}"
_final_far_file = "$_pkg_out_dir/${pkg.package_name}.far" _package_far_file_with_suffix = "${_package_far_file}.far"
_package_info_path = "$_pkg_out_dir/package" _package_info_path = "$_pkg_out_dir/package"
_write_manifest_target = "${pkg.package_name}__write_manifest" _write_manifest_target = "${pkg.package_name}__write_manifest"
_package_target = "${pkg.package_name}__pkg" _package_target = "${pkg.package_name}__pkg"
_bundle_target = "${pkg.package_name}__bundle"
# Generates a manifest file based on the GN runtime deps # Generates a manifest file based on the GN runtime deps
# suitable for "pm" tool consumption. # suitable for "pm" tool consumption.
...@@ -145,7 +144,7 @@ template("fuchsia_package") { ...@@ -145,7 +144,7 @@ template("fuchsia_package") {
} }
# Creates a package containing the metadata archive and blob data. # Creates a package containing the metadata archive and blob data.
action(_bundle_target) { action(target_name) {
forward_variables_from(invoker, [ "testonly" ]) forward_variables_from(invoker, [ "testonly" ])
script = "//build/gn_run_binary.py" script = "//build/gn_run_binary.py"
...@@ -163,47 +162,26 @@ template("fuchsia_package") { ...@@ -163,47 +162,26 @@ template("fuchsia_package") {
] ]
outputs = [ outputs = [
_combined_far_file, _package_far_file_with_suffix,
]
args = [
rebase_path(_pm_tool_path, root_build_dir),
"-o",
rebase_path(_pkg_out_dir, root_build_dir),
"-m",
rebase_path(_archive_manifest, root_build_dir),
"archive",
]
}
# Copies the archive to a well-known path.
# TODO(kmarshall): Use a 'pm' output flag to write directly to the desired
# file path instead.
copy(target_name) {
forward_variables_from(invoker, [ "testonly" ])
# Allows dependent targets to make use of "ids.txt".
public_deps = [
":$_write_manifest_target",
]
deps = [
":$_bundle_target",
] ]
data = [ data = [
_final_far_file, _package_far_file_with_suffix,
# Files specified here so that they can be read by isolated testbots. # Files specified here so that they can be read by isolated testbots.
_package_info_path, _package_info_path,
_build_ids_file, _build_ids_file,
] ]
sources = [ args = [
_combined_far_file, rebase_path(_pm_tool_path, root_build_dir),
] "-o",
outputs = [ rebase_path(_pkg_out_dir, root_build_dir),
_final_far_file, "-m",
rebase_path(_archive_manifest, root_build_dir),
"archive",
"-output",
rebase_path(_package_far_file, root_build_dir),
] ]
} }
} }
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