| # Copyright 2022 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("starnix_toolchain_test_component.gni") |
| |
| # Defines a Fuchsia component that contains a host test. |
| # |
| # This template expects to find a CML file named "meta/${test_name}.cml" where |
| # "test_name" is the name of this target. This file is used as the component |
| # manifest for the test. |
| # |
| # Parameters |
| # |
| # test_label (required) |
| # The label of the host test. The template will add the "($host_toolchain)" |
| # parameter. |
| # Type: GN label |
| # |
| # The remaining parameters are forwarded to the fuchsia_component template. |
| # TODO(fxbug.dev/100002): This should be removed once all our tests can be built |
| # using the explicit linux toolchain |
| template("starnix_host_test_component") { |
| assert(host_os == "linux") |
| test_toolchain = "$host_toolchain" |
| starnix_toolchain_test_component(target_name) { |
| forward_variables_from(invoker, "*") |
| } |
| } |