blob: b0bc89fb59543fc4abde6adbd032fd397f7fb371 [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/zircon/tools.gni")
# Verifies that the generated zedboot image has the specified commandline parameters set.
#
# Parameters:
#
# params: (required) [array of strings]
# List of params to look for in the generated zedboot image's cmdline section. Supports
# wildcards, defaults to partial line search.
template("verify_zedboot_cmdline_params") {
cmd = zircon_tool_path
in = "$root_out_dir/zedboot.zbi"
out = "$root_out_dir/verify_zedboot_cmdline_params_" + target_name + ".empty"
action(target_name) {
forward_variables_from(invoker, [ "testonly" ])
script = "//scripts/verify_cmdline_params/verify_cmdline_params.sh"
sources = [ in ]
deps = [
"//build/images/zedboot",
zbi_tool_target,
]
outputs = [ out ]
args = [
"-z",
rebase_path(cmd, root_build_dir),
"-i",
rebase_path(in, root_build_dir),
"-o",
rebase_path(out, root_build_dir),
"--",
] + invoker.params
}
}