| Satsuki Ueno | bc489a5 | 2021-04-27 17:07:05 +0000 | [diff] [blame] | 1 | # Copyright 2021 The Fuchsia Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | import("//build/components.gni") |
| 6 | import("//build/fidl/fidl.gni") |
| 7 | import("//build/rust/rustc_library.gni") |
| 8 | |
| 9 | fidl("fidl") { |
| 10 | name = "fuchsia.testing.deadline" |
| 11 | sources = [ "deadline.fidl" ] |
| Ian McKellar | ef9ca80 | 2023-01-19 01:22:38 +0000 | [diff] [blame] | 12 | enable_hlcpp = true |
| Satsuki Ueno | bc489a5 | 2021-04-27 17:07:05 +0000 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | rustc_library("named-timer") { |
| 16 | name = "named_timer" |
| 17 | with_unit_tests = true |
| 18 | |
| Sarah Chan | 64bf58d | 2025-12-06 16:25:07 -0800 | [diff] [blame] | 19 | edition = "2024" |
| Satsuki Ueno | bc489a5 | 2021-04-27 17:07:05 +0000 | [diff] [blame] | 20 | |
| 21 | deps = [ |
| Mitchell Kember | 0c5eddb | 2022-07-28 23:36:32 +0000 | [diff] [blame] | 22 | ":fidl_rust", |
| Adam Perry | 180a49c | 2024-10-03 06:38:50 +0000 | [diff] [blame] | 23 | "//sdk/rust/zx", |
| Satsuki Ueno | bc489a5 | 2021-04-27 17:07:05 +0000 | [diff] [blame] | 24 | "//src/lib/fuchsia-async", |
| Satsuki Ueno | bc489a5 | 2021-04-27 17:07:05 +0000 | [diff] [blame] | 25 | ] |
| 26 | |
| 27 | test_deps = [ "//third_party/rust_crates:futures" ] |
| 28 | |
| 29 | sources = [ "src/lib.rs" ] |
| 30 | |
| 31 | non_rust_deps = [ ":named_timer_noop_lib" ] |
| 32 | } |
| 33 | |
| 34 | source_set("named-timer-headers") { |
| 35 | sources = [ "named_timer.h" ] |
| 36 | } |
| 37 | |
| 38 | shared_library("named_timer_noop_lib") { |
| 39 | sources = [ "noop_timer.cc" ] |
| 40 | deps = [ ":named-timer-headers" ] |
| 41 | } |
| 42 | |
| 43 | fuchsia_unittest_package("named-timer-test") { |
| 44 | deps = [ ":named-timer_test" ] |
| 45 | } |
| 46 | |
| 47 | group("tests") { |
| 48 | testonly = true |
| 49 | deps = [ ":named-timer-test" ] |
| 50 | } |