blob: 069590df472ec07083e0858e704e156fb0f88e34 [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.
import("//build/python/python_host_test.gni")
import("//build/python/python_library.gni")
_cli_tests = [
"tests/test_cli.py",
"commands/tests/test_lifecycle_commands.py",
"commands/tests/test_execution_commands.py",
"commands/tests/test_inspection_commands.py",
"commands/tests/test_breakpoint_commands.py",
]
if (is_host) {
# Keep the GN host tests above the sentinel because bazel2gn does not
# translate host_py_test.
foreach(test_source, _cli_tests) {
_test_name = get_path_info(test_source, "name")
python_host_test(_test_name) {
main_source = test_source
libraries = [
":cli_lib",
":test_helpers",
]
test_data_deps =
[ "//build/prebuilt/third_party/pydantic-core:test_data" ]
}
}
group("tests") {
testonly = true
deps = []
foreach(test_source, _cli_tests) {
_test_name = get_path_info(test_source, "name")
deps += [ ":$_test_name" ]
}
}
} else {
group("tests") {
testonly = true
deps = [ ":tests($host_toolchain)" ]
}
}
## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ##
#
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
#
#
# AUTO-GENERATED - DO NOT EDIT
#
# The targets below are auto-generated based on the targets defined in the
# BUILD.bazel file from the same directory. If you made changes to targets in
# Bazel, instead of editing this file manually, run:
#
# > fx bazel2gn
#
# Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and
# rerun bazel2gn.
import("//build/tools/bazel2gn/bazel_migration.gni")
if (is_host) {
python_library("cli_lib") {
sources = [
"__init__.py",
"cli.py",
"commands/__init__.py",
"commands/aspace.py",
"commands/async_backtrace.py",
"commands/attach.py",
"commands/base.py",
"commands/break_cmd.py",
"commands/console.py",
"commands/continue_cmd.py",
"commands/detach.py",
"commands/diagnose_hang.py",
"commands/driver_list.py",
"commands/evaluate.py",
"commands/finish.py",
"commands/get_state.py",
"commands/handles.py",
"commands/location_utils.py",
"commands/mem_read.py",
"commands/modules.py",
"commands/next_cmd.py",
"commands/pause.py",
"commands/schema.py",
"commands/stack_trace.py",
"commands/start.py",
"commands/step_in.py",
"commands/stop.py",
"commands/threads.py",
"commands/tracepoint.py",
"commands/variables.py",
"commands/wait_for_event.py",
"commands/watch_cmd.py",
]
imports = [ ".." ]
visibility = [
":*",
"//scripts/debug:*",
"//scripts/debug/zxdb_cli/tests:*",
]
deps = [
"//scripts/debug/zxdb_cli/daemon_manager",
"//scripts/debug/zxdb_cli/shared:protocol_lib",
"//scripts/lib/fx_cmd",
]
enable_mypy = false
}
}
if (is_host) {
python_library("test_helpers") {
testonly = true
sources = [
"tests/__init__.py",
"tests/helpers.py",
]
imports = [ ".." ]
deps = [ ":cli_lib" ]
enable_mypy = false
}
}