blob: bca2fd075cff6bd1bf00f7ef7526786fd6c87fb0 [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.
import("//build/package.gni")
# 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" ]
}
}
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",
":multithreaded_breakpoint_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("multithreaded_breakpoint_test_exe") {
testonly = true
output_name = "multithreaded_breakpoint_test_exe"
sources = [
"multithreaded_breakpoint_test_exe.cc",
]
deps = [
":debug_agent_test_so",
]
}
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") {
testonly = true
public_deps = [
":debug_test_false",
":debug_test_true",
":multi_threaded",
":hw_breakpointer",
":hw_watchpointer",
":printer",
":process_loop",
":process_spawner",
]
}
executable("debug_test_true") {
sources = [
"true.c",
]
}
executable("debug_test_false") {
sources = [
"false.c",
]
}
executable("hw_breakpointer") {
testonly = true
output_name = "hw_breakpointer"
sources = [
"hw_breakpointer.cc",
]
deps = [
"//src/developer/debug/shared",
"//src/lib/fxl",
"//zircon/public/lib/zx",
]
}
executable("hw_watchpointer") {
testonly = true
output_name = "hw_watchpointer"
sources = [
"hw_watchpointer.cc",
]
deps = [
"//src/developer/debug/shared",
"//src/lib/fxl",
"//zircon/public/lib/zx",
]
}
executable("multi_threaded") {
testonly = true
sources = [
"multi_threaded.cc",
]
deps = [
"//src/lib/fxl",
"//zircon/public/lib/zx",
]
}
executable("printer") {
sources = [
"printer.cc",
]
}
executable("process_loop") {
testonly = true
output_name = "process_loop"
sources = [
"process_loop.cc",
]
}
executable("process_spawner") {
testonly = true
output_name = "process_spawner"
sources = [
"process_spawner.cc",
]
deps = [
"//src/lib/fxl",
"//zircon/public/lib/fdio",
"//zircon/public/lib/zx",
]
}