blob: 9d0b68115df91234d71cf8ee0871ced6c4465821 [file] [log] [blame]
# 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/package.gni")
import("//src/sys/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" ])
}
}
}