blob: 1c3a21cdcd802bda7efb76dc290e9c2e6425bebd [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/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
load("//build/bazel/rules/host:defs.bzl", "fx_script_host_tool")
load("//build/bazel/rules/host_tests:host_py_test.bzl", "host_py_test")
package(default_applicable_licenses = ["//:license"])
filegroup(
name = "runtime_files",
srcs = [
"__init__.py",
"builder.py",
"fx_builtins.py",
"locator.py",
"main.py",
"metadata.py",
"metrics.py",
"registry.py",
"//tools/devshell/lib:agent_session_ids.txt",
"//tools/devshell/lib:agents.txt",
"//tools/devshell/lib:fx-optional-features.sh",
"//tools/devshell/lib:platform.sh",
],
visibility = [
"//scripts/shac:__pkg__",
"//tools/devshell:__subpackages__",
],
)
fx_script_host_tool(
name = "registry",
data = [":runtime_files"],
script = "registry.py",
visibility = ["//tools/devshell:__subpackages__"],
)
host_py_test(
name = "registry_test",
srcs = [
"__init__.py",
"registry.py",
"registry_test.py",
],
data = [":registry"],
imports = ["."],
main = "registry_test.py",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//tools:__subpackages__"],
)
host_py_test(
name = "locator_test",
srcs = [
"__init__.py",
"locator.py",
"locator_test.py",
"registry.py",
],
imports = ["."],
main = "locator_test.py",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//tools:__subpackages__"],
)
host_py_test(
name = "builder_test",
srcs = [
"__init__.py",
"builder.py",
"builder_test.py",
"registry.py",
"test_utils.py",
],
imports = ["."],
main = "builder_test.py",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//tools:__subpackages__"],
deps = ["//build/scripts:lock_utils"],
)
host_py_test(
name = "metrics_test",
srcs = [
"__init__.py",
"metadata.py",
"metrics.py",
"metrics_test.py",
"test_utils.py",
],
data = [
"//tools/devshell/lib:agent_session_ids.txt",
"//tools/devshell/lib:agents.txt",
"//tools/devshell/lib:fx-optional-features.sh",
],
imports = ["."],
main = "metrics_test.py",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//tools:__subpackages__"],
)
host_py_test(
name = "fx_builtins_test",
srcs = [
"__init__.py",
"builder.py",
"fx_builtins.py",
"fx_builtins_test.py",
"locator.py",
"metadata.py",
"registry.py",
],
data = [
"//tools/devshell/lib:agent_session_ids.txt",
"//tools/devshell/lib:agents.txt",
"//tools/devshell/lib:fx-optional-features.sh",
"//tools/devshell/lib:platform.sh",
],
imports = ["."],
main = "fx_builtins_test.py",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//tools:__subpackages__"],
deps = ["//build/scripts:lock_utils"],
)
host_py_test(
name = "main_test",
srcs = [
"__init__.py",
"builder.py",
"fx_builtins.py",
"locator.py",
"main.py",
"main_test.py",
"metadata.py",
"metrics.py",
"registry.py",
"test_utils.py",
],
data = [
"//scripts:fx",
"//tools/devshell/lib:agent_session_ids.txt",
"//tools/devshell/lib:agents.txt",
"//tools/devshell/lib:fx-optional-features.sh",
"//tools/devshell/lib:platform.sh",
],
imports = ["."],
main = "main_test.py",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//tools:__subpackages__"],
deps = ["//build/scripts:lock_utils"],
)