blob: fcd08ca4836f73f1a377f7ed24cb687f6b5f281d [file]
# Copyright 2024 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.
import("//build/components.gni")
import("//build/testing/environments.gni")
import("//sdk/ctf/build/ctf.gni")
# Canonical target.
group("example") {
testonly = true
deps = [
":pkg",
":tests",
]
}
# Canonical target.
group("tests") {
testonly = true
deps = [ ":root_pkg" ]
}
# See target `:pkg` below.
fuchsia_component("component") {
testonly = true
manifest = "meta/default.cml"
deps = [ ":test" ]
}
# Declaring this package as `cft_fuchsia_package` allows it to become an
# interchangeable module in Fuchsia's testing framework CTF.
ctf_fuchsia_package("pkg") {
package_name = "src_sys_time_testing_example"
testonly = true
deps = [
":component",
"//src/lib/fake-clock/svc",
# Also package the realm builder server as a subcomponent in this same
# package. Required transitively.
"//src/lib/fuchsia-component-test/realm_builder_server:realm_builder_server_component",
]
}
# The test realm based integration tests must have a mostly empty "root"
# component, which only needs to start the test realm factory and the
# test driver components.
fuchsia_test_component("root") {
component_name = "test_root"
testonly = true
manifest = "meta/test-root.cml"
}
# This target together with `:root` above will lead to the component URL:
# `fuchsia-pkg://fuchsia.com/src_sys_time_testing_example_root#meta/root.cm`
#
# The package naming gets complicated fast, because all packages are served
# from a flat namespace. It would have perhaps been nicer to serve as:
#
# `fuchsia-pkg://fuchsia.com/src/sys/time/testing/example/root#meta/root.cm`
# or some such. But it's not ideal.
fuchsia_test_package("root_pkg") {
package_name = "src_sys_time_testing_example_root"
test_components = [
# The top-level component.
":root",
]
subpackages = [
# The test driver package
":pkg",
# The Timekeeper test realm factory (TTRF) package.
"//src/sys/time/testing/realm-proxy:pkg",
]
test_specs = {
log_settings = {
# Some tests produce "error" level logs as part of the test execution.
max_severity = "ERROR"
}
}
}
## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ##
#
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
#
#
# AUTO-GENERATED - DO NOT EDIT
#
# The targets below are auto-generated based on the targets defined in the
# BUILD.bazel file from the same directory. If you made changes to targets in
# Bazel, instead of editing this file manually, run:
#
# > fx bazel2gn
#
# Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and
# rerun bazel2gn.
import("//build/tools/bazel2gn/bazel_migration.gni")
rustc_test("test") {
sources = [ "src/lib.rs" ]
output_name = "src_sys_time_example"
edition = "2024"
deps = [
"//sdk/fidl/fuchsia.testing.harness:fuchsia.testing.harness_rust",
"//sdk/fidl/fuchsia.time:fuchsia.time_rust",
"//sdk/fidl/fuchsia.time.external:fuchsia.time.external_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:anyhow",
"//third_party/rust_crates:chrono",
]
}