blob: 969cd7e078c5c9d57e17e8e003f3f0e8ff6dd64e [file]
# 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/components:fx_component.bzl",
"fx_component_manifest",
"fx_test_component",
)
load("//build/bazel/rules/fidl:fidl_library.bzl", "fidl_library")
load("//build/bazel/rules/packages:fx_package.bzl", "fx_package")
load("//build/bazel/rules/packages:fx_packaged_binary.bzl", "fx_packaged_binary")
load("//build/bazel/rules/testing:fx_test.bzl", "fx_test")
package(default_applicable_licenses = ["//:license"])
fidl_library(
name = "fuchsia.runtime.microbenchmarks",
srcs = ["test.fidl"],
contains_drivers = True,
deps = ["//zircon/vdso/zx"],
)
fx_cc_binary(
name = "bin",
testonly = True,
srcs = [
"arena.cc",
"assert.h",
"channels.cc",
"dispatchers.cc",
"handle.cc",
"integration.cc",
"message_packet.cc",
"multi_dispatcher.cc",
"one_way.cc",
"round_trips.cc",
"test_runner.cc",
"test_runner.h",
],
gn_output_name = "driver_runtime_microbenchmarks",
deps = [
":fuchsia.runtime.microbenchmarks_cpp",
"//sdk/lib/async:async-cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/driver/runtime:driver_runtime_cpp",
"//sdk/lib/driver/runtime:driver_runtime_env",
"//sdk/lib/driver/runtime:driver_runtime_env_cpp",
"//sdk/lib/driver/runtime:driver_runtime_testing",
"//sdk/lib/driver/runtime/testing/cpp",
"//sdk/lib/syslog/cpp",
"//src/devices/bin/driver_runtime",
"//src/devices/bin/driver_runtime:driver_runtime_impl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/perftest",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/sync:sync-cpp",
"//zircon/system/ulib/zx",
],
)
fx_packaged_binary(
name = "bin_packaged",
testonly = True,
binary = ":bin",
binary_name = "driver_runtime_microbenchmarks",
)
fx_component_manifest(
name = "driver_runtime_microbenchmarks_manifest",
testonly = True,
component_name = "driver_runtime_microbenchmarks",
includes = [
"//sdk/lib/sys/testing:elf_test_runner.shard.cml",
"//sdk/lib/syslog:client.shard",
],
manifest = "meta/driver_runtime_microbenchmarks.cml",
)
fx_test_component(
name = "driver_runtime_microbenchmarks_component",
compiled_manifest = ":driver_runtime_microbenchmarks_manifest",
test_type = "system",
deps = [":bin_packaged"],
)
fx_package(
name = "driver_runtime_microbenchmarks",
testonly = True,
test_components = [":driver_runtime_microbenchmarks_component"],
visibility = ["//src/devices/bin/driver_runtime:__pkg__"],
)
fx_test(
name = "driver_runtime_microbenchmarks_unittest",
package = ":driver_runtime_microbenchmarks",
)