blob: 7b321d0e71beddf8d48b0f77ac1ade46610f6593 [file] [log] [blame]
# Copyright 2018 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.
# Targets meant for helping zxdb development. See README.md
# Test .so ---------------------------------------------------------------------
group("debug_so") {
testonly = true
public_deps = [
":debug_agent_test_loadable_module",
":debug_agent_test_so",
]
}
source_set("debug_agent_test_so_lib") {
testonly = true
public = [ "test_so_symbols.h" ]
sources = [ "breakpoint_test_so.cc" ]
if (current_cpu == "x64") {
sources += [ "x64_write_register_test_so.cc" ]
}
# TODO(https://fxbug.dev/42180987): workaround for toolchain issues, see bug
deps = [ "//build/config/fuchsia:uses-outline-atomics-fxbug98632" ]
}
shared_library("debug_agent_test_so") {
testonly = true
public_deps = [ ":debug_agent_test_so_lib" ]
}
loadable_module("debug_agent_test_loadable_module") {
testonly = true
output_name = "debug_agent_test_so"
deps = [ ":debug_agent_test_so_lib" ]
}
# Text Executables -------------------------------------------------------------
group("test_executables") {
testonly = true
public_deps = [
":breakpoint_test_exe",
":load_so_exe",
":multithreaded_breakpoint_test_exe",
":watchpoint_test_exe",
]
if (current_cpu == "x64") {
public_deps += [
# TODO(donosoc): This test should suport both archs inherently.
":write_register_test_exe",
]
}
}
executable("breakpoint_test_exe") {
testonly = true
output_name = "breakpoint_test_exe"
sources = [ "breakpoint_test_exe.cc" ]
deps = [ ":debug_agent_test_so" ]
}
executable("load_so_exe") {
testonly = true
sources = [ "load_so.cc" ]
# This must use the loadable module because it's loaded dynamically.
deps = [ ":debug_agent_test_loadable_module" ]
}
executable("multithreaded_breakpoint_test_exe") {
testonly = true
output_name = "multithreaded_breakpoint_test_exe"
sources = [ "multithreaded_breakpoint_test_exe.cc" ]
deps = [ ":debug_agent_test_so" ]
# TODO(https://fxbug.dev/42085293): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-vla-cxx-extension" ]
}
executable("watchpoint_test_exe") {
testonly = true
output_name = "watchpoint_test_exe"
sources = [ "watchpoint_test_exe.cc" ]
}
if (current_cpu == "x64") {
executable("write_register_test_exe") {
testonly = true
output_name = "write_register_test_exe"
sources = [ "x64_write_register_test_exe.cc" ]
public_deps = [ ":debug_agent_test_so" ]
}
}
# Helper Executables -----------------------------------------------------------
group("helper_executables") {
public_deps = [
":backtrace_request",
":debug_test_false",
":debug_test_true",
":hw_watchpointer",
":limbo_caller",
":multi_threaded",
":printer",
":test_suite",
":thread_signals",
]
}
executable("backtrace_request") {
sources = [ "backtrace_request.cc" ]
deps = [
"//src/lib/debug:backtrace-request",
"//zircon/system/ulib/zx",
]
}
executable("debug_test_true") {
sources = [ "true.c" ]
}
executable("debug_test_false") {
sources = [ "false.c" ]
}
executable("test_suite") {
output_name = "test_suite"
sources = [
"test_suite.cc",
"test_suite_helpers.cc",
"test_suite_helpers.h",
]
data_deps = [
# NOTE: The 'test_suite' executable will launch '/pkg/bin/hw_watchpointer' at runtime!
":hw_watchpointer",
]
deps = [
"//sdk/lib/fit",
"//src/developer/debug/shared",
"//src/lib/fxl",
"//zircon/system/ulib/zx",
]
}
executable("hw_watchpointer") {
output_name = "hw_watchpointer"
sources = [ "hw_watchpointer.cc" ]
deps = [
"//src/developer/debug/shared",
"//src/lib/fxl",
"//zircon/system/ulib/zx",
]
}
executable("multi_threaded") {
sources = [ "multi_threaded.cc" ]
deps = [
"//src/lib/fxl",
"//zircon/system/ulib/zx",
]
}
executable("printer") {
sources = [ "printer.cc" ]
}
executable("thread_signals") {
output_name = "thread_signals"
sources = [ "thread_signals.cc" ]
deps = [
"//sdk/lib/fdio",
"//src/lib/fxl",
"//zircon/system/ulib/zx",
]
}
executable("limbo_caller") {
output_name = "limbo_caller"
sources = [ "limbo_caller.cc" ]
deps = [
"//sdk/fidl/fuchsia.exception:fuchsia.exception_hlcpp",
"//sdk/lib/sys/cpp",
"//src/lib/fsl",
"//src/lib/fxl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zx",
]
}