blob: 2d833d917d2504d9612925e601f553e199a74676 [file] [edit]
# 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("@rules_python//python:py_library.bzl", "py_library")
load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
load("//build/bazel/rules/host_tests:host_py_test.bzl", "host_py_test")
package(default_applicable_licenses = ["//:license"])
py_library(
name = "setting",
srcs = ["setting.py"],
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = [
"//build/scripts:__pkg__",
"//tools/devshell:__pkg__",
],
)
host_py_test(
name = "setting_test",
srcs = ["setting_test.py"],
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [":setting"],
)
py_library(
name = "client",
srcs = ["client.py"],
imports = ["."],
target_compatible_with = HOST_OS_CONSTRAINTS,
)
py_library(
name = "worker",
srcs = ["worker.py"],
imports = ["."],
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [":client"],
)
py_library(
name = "stats",
srcs = ["stats.py"],
imports = ["."],
target_compatible_with = HOST_OS_CONSTRAINTS,
)
py_library(
name = "forker",
srcs = ["forker.py"],
imports = ["."],
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
":client",
":stats",
":worker",
],
)
py_library(
name = "server",
srcs = ["server.py"],
imports = ["."],
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
":forker",
":stats",
":worker",
],
)
host_py_test(
name = "client_test",
srcs = ["client_test.py"],
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [":client"],
)
py_library(
name = "server_test_data",
testonly = True,
srcs = [
"test_data/fake_wrapper.py",
"test_data/remote_action.py",
],
target_compatible_with = HOST_OS_CONSTRAINTS,
)
host_py_test(
name = "server_test",
testonly = True,
srcs = ["server_test.py"],
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
":client",
":server",
":server_test_data",
":worker",
],
)
py_library(
name = "forkserver_wrap",
srcs = ["forkserver_wrap.py"],
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//build/scripts:__pkg__"],
deps = [
":client",
":server",
"//build/scripts:signal_utils",
],
)
host_py_test(
name = "forkserver_wrap_test",
srcs = ["forkserver_wrap_test.py"],
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
":forkserver_wrap",
":worker",
],
)