blob: 8060a533b170e8d5ca867884edd1804f9b5a759c [file] [log] [blame] [edit]
# Copyright 2020 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("//sdk/ctf/build/ctf_fuchsia_component.gni")
# A Fuchsia component that can be used as a CTF test.
#
# An equivalent to fuchsia_component, but:
# 1. It ensures dependencies are allowed in CTF.
# 2. The component's name is always 'default' and cannot be overriden.
# 3. It must be a CFv2 component.
#
# Parameters
# manifest (required)
# The path to the component manifest
# Type: string or label
#
# testonly
# deps
# These parameters have the usual definitions.
template("ctf_test_component") {
assert(defined(invoker.manifest), "manifest is required")
# Component names are part of the CTF test package's ABI. They must be
# predictable and unchanging.
assert(!defined(invoker.component_name),
"do not set component_name for CTF tests; it is always 'default'")
ctf_fuchsia_component(target_name) {
forward_variables_from(invoker, "*")
component_name = "default"
}
}