| # Copyright 2023 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/components.gni") |
| |
| # Defines a fuchsia_test_package containing netemul-guest tests. |
| # |
| # Example: |
| # ``` |
| # fuchsia_netemul_guest_test_package("guest-integration-tests") { |
| # test_components = [ ":foo-guest-integration-test" ] |
| # deps = [ |
| # "//foo", |
| # ] |
| # } |
| # ``` |
| # |
| # Parameters |
| # |
| # test_components (required) |
| # List of test components to include in the package. |
| # Type: list(path) |
| # |
| # deps (optional) |
| # List of additional package dependencies. |
| # Type: list(path) |
| # |
| # data_deps |
| # public_deps |
| # test_components |
| # visibility |
| template("fuchsia_netemul_guest_test_package") { |
| fuchsia_test_package(target_name) { |
| assert(defined(invoker.test_components), "Must specify test_components") |
| forward_variables_from(invoker, |
| [ |
| "data_deps", |
| "public_deps", |
| "test_components", |
| "visibility", |
| ]) |
| |
| test_specs = { |
| environments = guest_envs |
| |
| # TODO(https://fxbug.dev/42068946): Remove error logging in clean shutdown paths. |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| |
| # TODO(https://fxbug.dev/42069490): Enable parallelized guest tests. |
| parallel = 1 |
| } |
| |
| deps = [ |
| # netemul-guest is used to create guests in tests. |
| "//src/connectivity/network/testing/netemul/guest:netemul-guest", |
| ] |
| if (defined(invoker.deps)) { |
| deps += invoker.deps |
| } |
| |
| subpackages = [ |
| # guest-manager is used by netemul-guest to create and interact with guests. |
| "//src/virtualization/bin/guest_manager:debian_guest_manager", |
| ] |
| } |
| } |