blob: 574e981c76fd3aca51eba34a9b79adb34cddead3 [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")
import("//build/testing/environments.gni")
import("//src/developer/ffx/config.gni")
group("tests") {
testonly = true
deps = [ ":dap_framework_test($host_toolchain)" ]
}
group("e2e_tests") {
testonly = true
deps = [ ":dap_integration_test($host_toolchain)" ]
}
if (is_host) {
python_library("dap_test_framework") {
library_name = "dap_test_framework"
sources = [
"__init__.py",
"dap_test_framework.py",
]
deps = [
"//scripts/lib/async_utils",
"//src/lib/debug/dap/python:lib",
"//src/lib/debug/dap/python/zxdb:zxdb_dap",
"//third_party/python_portpicker:portpicker",
]
}
host_test_data("zxdb_test_data") {
testonly = true
deps = [ "//src/developer/debug/zxdb:zxdb_host_tool" ]
sources = [ "${host_tools_dir}/zxdb" ]
}
python_host_test("dap_framework_test") {
main_source = "tests/dap_framework_test.py"
deps = [
":dap_test_framework",
"//prebuilt/third_party/pydantic-core:test_data",
"//src/lib/debug/dap/python:lib",
]
}
python_host_test("dap_integration_test") {
main_source = "dap_integration_test.py"
main_callable = "main"
environments = all_fuchsia_envs
# Most host tools don't support arm64.
if (board_name == "arm64" || board_name == "qemu-arm64") {
environments -= [ emu_env ]
}
package_deps = [
"//src/developer/debug/debug_agent",
"//src/developer/debug/e2e_tests/inferiors:zxdb_e2e_inferiors",
"//src/developer/forensics/crasher",
"//src/developer/forensics/crasher:crasher_test",
]
deps = [
":dap_test_framework",
"//scripts/lib/ffx_cmd",
"//scripts/lib/package_server",
"//src/lib/debug/dap/python:lib",
]
_ffx_test_data_path =
rebase_path(ffx_test_host_tools_out_dir, root_build_dir)
extra_args = [
"--DAP_E2E_TESTS_FFX_TEST_DATA",
_ffx_test_data_path,
]
test_data_deps = [
":zxdb_test_data",
"//prebuilt/third_party/pydantic-core:test_data",
"//src/developer/ffx:test_data",
"//src/developer/ffx/plugins/debug:ffx_debug_plugin_tool_test_data",
]
}
}