| # 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/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_binary("fake_clock_svc") { |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/lib/fake-clock/fidl:fidl-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", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:rand", |
| ] |
| } |
| |
| package("svc") { |
| package_name = "fake_clock" |
| deps = [ ":fake_clock_svc" ] |
| |
| binaries = [ |
| { |
| name = "fake_clock_svc" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/fake_clock.cmx") |
| dest = "fake_clock.cmx" |
| }, |
| ] |
| } |
| |
| unittest_package("tests") { |
| package_name = "fake_clock_test" |
| deps = [ ":fake_clock_svc_test" ] |
| tests = [ |
| { |
| name = "fake_clock_svc_bin_test" |
| environments = [ qemu_env ] |
| }, |
| ] |
| } |