blob: daf8ba98fdae858398a19167df30e818f2e3840c [file] [log] [blame]
# 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("//build/rust/rustc_test.gni")
import("//src/sys/build/components.gni")
rustc_test("shutdown_shim_integration_test_bin") {
edition = "2018"
source_root = "src/main.rs"
deps = [
"//sdk/fidl/fuchsia.device.manager:fuchsia.device.manager-rustc",
"//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/topology_builder",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
]
sources = [
"src/main.rs",
"src/shutdown_mocks.rs",
]
}
fuchsia_component("shutdown_shim_integration_test_component") {
manifest = "meta/shutdown-shim-integration-test.cml"
component_name = "shutdown-shim-integration-tests"
deps = [ ":shutdown_shim_integration_test_bin" ]
testonly = true
}
# The shutdown shim runs from the ZBI in prod, so there isn't a
# fuchsia_component target that exists yet that we can depend on. Let's define
# one here so we can put the shim in our test package.
fuchsia_component("shutdown_shim_component") {
manifest = "meta/shutdown-shim.cml"
component_name = "shutdown-shim"
deps = [ "..:shutdown-shim" ]
testonly = true
}
fuchsia_test_package("shutdown-shim-integration-tests") {
deps = [
":shutdown_shim_component",
":shutdown_shim_integration_test_component",
]
test_components = [ ":shutdown_shim_integration_test_component" ]
}
group("tests") {
testonly = true
deps = [ ":shutdown-shim-integration-tests" ]
}