| # 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/host.gni") |
| import("//build/package.gni") |
| |
| # Set manually to true to compile the zxdb_test_app.cc file for manual debugger |
| # testing of various conditions. |
| include_test_app = false |
| |
| executable("bin") { |
| output_name = "zxdb" |
| |
| sources = [] |
| deps = [ |
| "//garnet/bin/zxdb/client", |
| "//garnet/bin/zxdb/console", |
| "//garnet/lib/debug_ipc:client", |
| ] |
| |
| if (current_toolchain == host_toolchain) { |
| sources += [ "main_host.cc" ] |
| } else { |
| sources += [ "main_target.cc" ] |
| deps += [ "//garnet/bin/debug_agent:lib" ] |
| } |
| } |
| |
| package("zxdb") { |
| deprecated_system_image = true |
| deps = [ |
| ":bin", |
| ] |
| binaries = [ |
| { |
| name = "zxdb" |
| }, |
| ] |
| } |
| |
| install_host_tools("host") { |
| testonly = true |
| deps = [ |
| ":bin", |
| ":unittests", |
| ] |
| outputs = [ |
| "zxdb", |
| "zxdb_tests", |
| ] |
| } |
| |
| if (include_test_app) { |
| executable("zxdb_test_app") { |
| sources = [ |
| "zxdb_test_app.cc", |
| ] |
| deps = [ |
| "//zircon/public/lib/zx", |
| ] |
| } |
| } |
| |
| executable("unittests") { |
| testonly = true |
| output_name = "zxdb_tests" |
| |
| sources = [ |
| ] |
| |
| deps = [ |
| "//garnet/bin/zxdb/client:tests", |
| "//garnet/bin/zxdb/console:tests", |
| "//garnet/lib/debug_ipc:tests", |
| "//third_party/googletest:gtest_main", |
| "//third_party/googletest:gtest", |
| ] |
| |
| # TODO(brettw) when host support for the helper (message loops, etc.) is |
| # available, this should be an unconditional dependency. |
| if (current_toolchain != host_toolchain) { |
| deps += [ "//garnet/lib/debug_ipc/helper:tests" ] |
| } |
| } |
| |
| package("zxdb_tests") { |
| testonly = true |
| deprecated_system_image = true |
| |
| package_name = "zxdb_tests" |
| |
| deps = [ |
| ":unittests", |
| ] |
| |
| tests = [ |
| { |
| name = "zxdb_tests" |
| }, |
| ] |
| |
| if (include_test_app) { |
| deps += [ ":zxdb_test_app" ] |
| tests += [ { name = "zxdb_test_app"} ] |
| } |
| } |