| # Copyright 2019 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") |
| import("//build/rust/rustc_binary.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":session_control", |
| ":session_control_tests", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| name = "session_control" |
| with_unit_tests = true |
| edition = "2021" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.element:fuchsia.element_rust", |
| "//sdk/fidl/fuchsia.session:fuchsia.session_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/sys/lib/component_debug", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:futures" ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_shell_package("session_control") { |
| manifest = "meta/session_control.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_unittest_package("session_control_tests") { |
| manifest = "meta/session_control_bin_test.cml" |
| deps = [ |
| ":bin_test", |
| "//third_party/rust_crates:async-trait", |
| ] |
| } |