| # 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/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/test/test_package.gni") |
| |
| group("all") { |
| deps = [ ":session_control" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":session_control", |
| ":session_control_tests", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| name = "session_control" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.session:fuchsia.session-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/session/bin/session_manager:lib", |
| "//src/sys/component_manager/tests/fidl:components-rustc", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| package("session_control") { |
| deps = [ ":bin" ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/session_control.cml") |
| dest = "session_control.cm" |
| }, |
| ] |
| |
| binaries = [ |
| { |
| name = "session_control" |
| shell = true |
| }, |
| ] |
| } |
| |
| package("session_control_tests") { |
| testonly = true |
| deps = [ |
| ":bin", |
| ":bin_test", |
| "//src/session/bin/session_manager:lib", |
| "//third_party/rust_crates:async-trait", |
| ] |
| binaries = [ |
| { |
| name = "session_control" |
| }, |
| ] |
| tests = [ |
| { |
| name = "session_control_bin_test" |
| }, |
| ] |
| meta = [ |
| { |
| path = "meta/session_control_bin_test.cml" |
| dest = "session_control_bin_test.cm" |
| }, |
| ] |
| } |