blob: f2a05037c88fea1ab0f257becd8da67b1d879f12 [file] [log] [blame]
# 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")
import("//build/testing/environments.gni")
rustc_binary("fake_clock_svc") {
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/fake-clock/fidl:fidl_rust",
"//src/lib/fake-clock/named-timer:fidl_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//src/lib/fake-clock/named-timer",
"//src/lib/fuchsia",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("svc") {
testonly = true
component_name = "fake_clock"
manifest = "meta/fake_clock.cml"
deps = [ ":fake_clock_svc" ]
}
# Useful for subpackaging in tests.
fuchsia_package("pkg") {
testonly = true
package_name = "fake_clock"
deps = [ ":svc" ]
}
fuchsia_unittest_package("tests") {
package_name = "fake_clock_test"
deps = [ ":fake_clock_svc_test" ]
test_specs = {
environments = [ emu_env ]
}
}