| # 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("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_binary("bin") { |
| name = "mock_cobalt" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc", |
| "//sdk/fidl/fuchsia.cobalt.test:fuchsia.cobalt.test-rustc", |
| "//src/lib/cobalt/rust:fuchsia-cobalt", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| package("mock_cobalt") { |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| name = "mock_cobalt" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/mock_cobalt.cmx") |
| dest = "mock_cobalt.cmx" |
| }, |
| ] |
| } |
| |
| test_package("tests") { |
| package_name = "mock-cobalt-tests" |
| |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "mock_cobalt_bin_test" |
| dest = "mock-cobalt-unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |