| # Copyright 2026 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. | |
| # Start with reading README.md for details. | |
| load("//build/bazel/rules/rust:rustc_test.bzl", "rustc_test") | |
| package(default_applicable_licenses = ["//:license"]) | |
| # This target name, as well as other target names, should be short. | |
| # | |
| # NOTE: This test driver is packaged only by the GN `:component` / | |
| # `ctf_fuchsia_package("pkg")` / `fuchsia_test_package("root_pkg")` chain in | |
| # BUILD.gn. It needs `test.time.realm.RealmFactory` from the test root and | |
| # `//src/lib/fake-clock/lib:client.shard.cml`, `//src/lib/fake-clock/svc` and | |
| # the realm builder server, which have no Bazel targets yet, and CTF | |
| # packages have no Bazel equivalent. | |
| rustc_test( | |
| name = "test", | |
| srcs = ["src/lib.rs"], | |
| # This name must be long to avoid name clashes. It is also what appears | |
| # in the manifest under the key `program.binary`. | |
| crate_name = "src_sys_time_example", | |
| edition = "2024", | |
| deps = [ | |
| "//sdk/fidl/fuchsia.testing.harness:fuchsia.testing.harness_rust", | |
| "//sdk/fidl/fuchsia.time.external:fuchsia.time.external_rust", | |
| "//sdk/fidl/fuchsia.time:fuchsia.time_rust", | |
| "//sdk/rust/zx", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//src/sys/time/testing/fidl/test.time.realm:fidl_rust", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:chrono", | |
| ], | |
| ) |