| # 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/fidl/fidl.gni") |
| |
| if (current_toolchain == host_toolchain) { |
| static_library("host_lib") { |
| public = [ |
| "decoder.h", |
| "exception_decoder.h", |
| "interception_workflow.h", |
| "syscall_decoder.h", |
| "syscall_decoder_dispatcher.h", |
| "type_decoder.h", |
| ] |
| |
| sources = [ |
| "decoder.cc", |
| "exception_decoder.cc", |
| "interception_workflow.cc", |
| "syscall_decoder.cc", |
| "syscall_decoder_dispatcher.cc", |
| "syscall_definition.cc", |
| "type_decoder.cc", |
| ] |
| |
| deps = [ |
| "//src/developer/debug/ipc:client", |
| "//src/developer/debug/zxdb/client", |
| "//src/developer/debug/zxdb/common", |
| "//src/lib/fidl_codec", |
| "//src/lib/fxl", |
| "//third_party/rapidjson", |
| "//zircon/public/lib/fidl_base", |
| "//zircon/public/lib/fit", |
| ] |
| |
| public_deps = [ |
| "//zircon/system/public", |
| ] |
| } |
| } |
| |
| source_set("tests") { |
| testonly = true |
| sources = [ |
| "library_loader_test.cc", |
| "message_decoder_test.cc", |
| "wire_parser_test.cc", |
| ] |
| |
| deps = [ |
| ":fidl", |
| ":json_for_test", |
| ":lib", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/fidl/cpp:test_support", |
| "//sdk/lib/fidl/cpp/test", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| "//third_party/rapidjson", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| ] |
| } |
| |
| action("json_for_test") { |
| deps = [ |
| ":fidl($fidl_toolchain)", |
| ":fidl-composed($fidl_toolchain)", |
| ":fidl-sys($fidl_toolchain)", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/fidl/cpp/test:frobinator", |
| "//zircon/system/fidl/fuchsia-io", |
| ] |
| outputs = [ |
| "$target_gen_dir/library_loader_test_data.h", |
| ] |
| script = "generate_test_includes.sh" |
| args = [ |
| rebase_path(target_gen_dir, root_build_dir) + "/library_loader_test_data.h", |
| rebase_path(root_build_dir) + |
| "/fidling/gen/sdk/lib/fidl/cpp/test/frobinator.fidl.json", |
| rebase_path(root_build_dir) + |
| "/fidling/gen/zircon/system/fidl/fuchsia-io/fuchsia-io.fidl.json", |
| rebase_path(root_build_dir) + |
| "/fidling/gen/tools/fidlcat/lib/fidl.fidl.json", |
| rebase_path(root_build_dir) + |
| "/fidling/gen/tools/fidlcat/lib/fidl-composed.fidl.json", |
| rebase_path(root_build_dir) + |
| "/fidling/gen/tools/fidlcat/lib/fidl-sys.fidl.json", |
| ] |
| } |
| |
| fidl("fidl") { |
| name = "test.fidlcat.examples" |
| |
| sources = [ |
| "testdata/empty.test.fidl", |
| "testdata/types.test.fidl", |
| ] |
| } |
| |
| fidl("fidl-composed") { |
| name = "test.fidlcat.composedinto" |
| |
| sources = [ |
| "testdata/composed_into.test.fidl", |
| ] |
| |
| public_deps = [ |
| ":fidl", |
| ] |
| } |
| |
| fidl("fidl-sys") { |
| name = "test.fidlcat.sys" |
| |
| sources = [ |
| "testdata/sys.test.fidl", |
| ] |
| } |