| # Copyright 2018 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") |
| |
| # A test that exercises component functionality. |
| # See fxbug.dev/3941 for more context. |
| # |
| # Additional parameters |
| # |
| # environments (optional, default: [ { dimensions = { device_type = "QEMU" } } ]) |
| # [list of scopes] Device environments in which the tests should run. See |
| # //build/package.gni for more details. |
| # |
| template("sandbox_test_package") { |
| binary_rule = "${target_name}_bin" |
| binary_name = target_name |
| |
| executable(binary_rule) { |
| testonly = true |
| output_name = "${binary_name}" |
| forward_variables_from(invoker, |
| "*", |
| [ |
| "environments", |
| "deprecated_shell", |
| "deprecated_misc_storage", |
| "output_name", |
| "target_name", |
| "testonly", |
| ]) |
| } |
| |
| fuchsia_unittest_package(target_name) { |
| forward_variables_from(invoker, |
| [ |
| "deprecated_shell", |
| "deprecated_misc_storage", |
| ]) |
| manifest = "meta/${target_name}.cmx" |
| deps = [ ":${binary_rule}" ] |
| test_specs = { |
| forward_variables_from(invoker, [ "environments" ]) |
| } |
| } |
| } |