| # 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. | |
| load("//build/bazel/rules/cc:fx_cc_binary.bzl", "fx_cc_binary") | |
| load("//build/bazel/rules/cc:fx_cc_library.bzl", "fx_cc_library") | |
| load("//build/bazel/rules/rust:rustc_test.bzl", "rustc_test") | |
| package(default_applicable_licenses = ["//:license"]) | |
| fx_cc_library( | |
| name = "component_context", | |
| testonly = True, | |
| srcs = ["component_context.cc"], | |
| hdrs = ["component_context.h"], | |
| implementation_deps = [ | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async-loop:async-loop-default", | |
| "//sdk/lib/syslog/cpp", | |
| "//src/lib/fxl:fxl_cli", | |
| "//zircon/system/ulib/zx", | |
| ], | |
| visibility = [ | |
| "//src/lib/intl/intl_property_provider_impl:__pkg__", | |
| "//src/lib/intl/time_zone_info:__pkg__", | |
| ], | |
| deps = [ | |
| "//sdk/lib/sys/cpp", | |
| "//src/lib/testing/loop_fixture", | |
| ], | |
| alwayslink = True, | |
| ) | |
| fx_cc_binary( | |
| name = "trace_tests_bin", | |
| testonly = True, | |
| gn_output_name = "trace_tests", | |
| deps = ["//src/lib/fxl/test:gtest_main"], | |
| ) | |
| fx_cc_binary( | |
| name = "return_1234", | |
| testonly = True, | |
| srcs = ["return_1234.cc"], | |
| ) | |
| rustc_test( | |
| name = "list_categories_tests", | |
| srcs = ["list_categories_tests.rs"], | |
| crate_root = "list_categories_tests.rs", | |
| edition = "2024", | |
| target_compatible_with = ["@platforms//os:fuchsia"], | |
| deps = [ | |
| "//sdk/rust/zx", | |
| "//src/lib/fdio/rust:fdio", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-runtime", | |
| ], | |
| ) | |
| # TODO(https://fxbug.dev/592360908): Verify whether run_awhile should use target_compatible_with (was not gated by if (is_fuchsia) in GN). | |
| fx_cc_binary( | |
| name = "run_awhile", | |
| testonly = True, | |
| srcs = ["run_awhile.cc"], | |
| target_compatible_with = ["@platforms//os:fuchsia"], | |
| deps = ["//zircon/system/ulib/zx"], | |
| ) |