| # Copyright 2019 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/cpp/sdk_executable.gni") |
| import("//build/host.gni") |
| import("//build/package.gni") |
| import("//build/test.gni") |
| import("//build/testing/environments.gni") |
| |
| if (current_toolchain == host_toolchain) { |
| sdk_executable("bin") { |
| category = "partner" |
| |
| output_name = "fidlcat" |
| |
| sources = [ |
| "main.cc", |
| ] |
| deps = [ |
| ":lib", |
| "//src/developer/debug/ipc:client", |
| "//src/developer/debug/zxdb/client", |
| "//src/developer/debug/zxdb/common", |
| "//src/developer/debug/zxdb/console", |
| "//src/lib/fxl", |
| "//third_party/rapidjson", |
| "//tools/fidlcat/lib", |
| "//tools/fidlcat/lib:host_lib", |
| "//zircon/public/lib/fidl_base", |
| ] |
| } |
| |
| static_library("lib") { |
| public = [ |
| "command_line_options.h", |
| ] |
| |
| sources = [ |
| "command_line_options.cc", |
| ] |
| |
| deps = [ |
| "//zircon/public/lib/cmdline", |
| ] |
| } |
| |
| test("fidlcat_host_tests") { |
| deps = [ |
| ":host_tests", |
| ":lib", |
| "//third_party/googletest:gtest_main", |
| "//tools/fidlcat/lib:host_tests", |
| ] |
| } |
| |
| source_set("host_tests") { |
| testonly = true |
| sources = [ |
| "command_line_options_test.cc", |
| ] |
| deps = [ |
| ":lib", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/cmdline", |
| ] |
| } |
| } |
| |
| executable("fidlcat_lib_tests") { |
| testonly = true |
| output_name = "fidlcat_lib_tests" |
| sources = [] |
| deps = [ |
| "//tools/fidlcat/lib:tests", |
| ] |
| } |
| |
| package("fidlcat_tests") { |
| testonly = true |
| deps = [ |
| ":fidlcat_lib_tests", |
| ] |
| tests = [ |
| { |
| name = "fidlcat_lib_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| install_host_tools("fidlcat_host") { |
| deps = [ |
| ":bin", |
| ] |
| outputs = [ |
| "fidlcat", |
| ] |
| } |