| # 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") | |
| import("//build/testing/host_test_data.gni") | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":cli_integration_test($host_toolchain)" ] | |
| } | |
| if (is_host) { | |
| host_test_data("daemon_test_data") { | |
| _daemon_target = "//scripts/debug/zxdb_cli/daemon:daemon_bin" | |
| sources = [ get_label_info(_daemon_target, "target_out_dir") + | |
| "/zxdb-daemon.pyz" ] | |
| outputs = [ "${target_out_dir}/cli_integration_test/zxdb-daemon" ] | |
| deps = [ _daemon_target ] | |
| } | |
| python_library("integration_test_lib") { | |
| testonly = true | |
| library_name = "tests" | |
| sources = [ | |
| "__init__.py", | |
| "fake_dap_server.py", | |
| "test_attach_detach.py", | |
| "test_evaluate_and_console.py", | |
| "test_events.py", | |
| "test_execution.py", | |
| "test_lifecycle.py", | |
| "test_stack_trace.py", | |
| ] | |
| deps = [ | |
| "//scripts/debug/zxdb_cli/cli:cli_lib", | |
| "//scripts/debug/zxdb_cli/daemon:daemon_lib", | |
| "//third_party/python_portpicker:portpicker", | |
| ] | |
| } | |
| python_host_test("cli_integration_test") { | |
| main_source = "integration_test_cli.py" | |
| libraries = [ ":integration_test_lib" ] | |
| test_data_deps = [ | |
| ":daemon_test_data", | |
| # 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. | |
| "//prebuilt/third_party/pydantic-core:test_data", | |
| ] | |
| } | |
| } |