blob: 83d1e628d2794f84a1a4172dd841ab0b1419d41b [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.
import("//build/python/host.gni")
import("//build/python/python_host_test.gni")
import("//build/python/python_library.gni")
group("tests") {
testonly = true
deps = [
":daemon_events_test($host_toolchain)",
":daemon_test($host_toolchain)",
":daemon_zxdb_mixin_test($host_toolchain)",
]
}
if (is_host) {
python_library("daemon_lib") {
library_name = "daemon"
sources = [
"__init__.py",
"constants.py",
"daemon.py",
"handlers/__init__.py",
"handlers/attach.py",
"handlers/break_req.py",
"handlers/continue_req.py",
"handlers/detach.py",
"handlers/evaluate.py",
"handlers/get_state.py",
"handlers/hello.py",
"handlers/pause.py",
"handlers/stack_trace.py",
"handlers/start.py",
"handlers/stop.py",
"handlers/threads.py",
"handlers/variables.py",
"handlers/wait_for_event.py",
]
deps = [
"//scripts/debug/zxdb_cli/shared:protocol_lib",
"//scripts/lib/ffx_cmd",
"//scripts/lib/package_server",
"//src/lib/debug/dap/python:lib",
"//src/lib/debug/dap/python/zxdb:zxdb_dap",
]
}
python_binary("daemon_bin") {
main_source = "main.py"
output_name = "zxdb-daemon.pyz"
main_callable = "main"
deps = [ ":daemon_lib" ]
}
install_python_tool("install") {
name = "zxdb-daemon"
binary = ":daemon_bin"
}
python_host_test("daemon_test") {
main_source = "tests/test_daemon.py"
libraries = [ ":daemon_lib" ]
# Explicitly depend on pydantic-core's test_data. This is to ensure that the
# module's DSO is bundled together with our test so the top-level pydantic
# module loads correctly.
test_data_deps = [ "//prebuilt/third_party/pydantic-core:test_data" ]
}
python_host_test("daemon_events_test") {
main_source = "tests/test_events.py"
libraries = [ ":daemon_lib" ]
# Explicitly depend on pydantic-core's test_data. This is to ensure that the
# module's DSO is bundled together with our test so the top-level pydantic
# module loads correctly.
test_data_deps = [ "//prebuilt/third_party/pydantic-core:test_data" ]
}
python_host_test("daemon_zxdb_mixin_test") {
main_source = "tests/test_zxdb_mixin.py"
libraries = [ ":daemon_lib" ]
# Explicitly depend on pydantic-core's test_data. This is to ensure that the
# module's DSO is bundled together with our test so the top-level pydantic
# module loads correctly.
test_data_deps = [ "//prebuilt/third_party/pydantic-core:test_data" ]
}
}