| # Copyright 2020 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/sdk/sdk_host_tool.gni") |
| import("//build/test.gni") |
| import("//build/testing/environments.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| if (is_host) { |
| source_set("src") { |
| sources = [ |
| "analytics.cc", |
| "command_line_options.cc", |
| "log_parser.cc", |
| "symbolizer_impl.cc", |
| ] |
| public_deps = [ |
| "//src/developer/debug/zxdb/client", |
| "//src/developer/debug/zxdb/console", |
| "//src/developer/debug/zxdb/symbols", |
| "//src/lib/analytics/cpp/core_dev_tools", |
| "//src/lib/fxl", |
| "//third_party/rapidjson", |
| "//zircon/system/ulib/cmdline", |
| ] |
| } |
| |
| executable("symbolizer") { |
| sources = [ "main.cc" ] |
| deps = [ |
| ":src", |
| "//src/lib/fxl", |
| ] |
| } |
| |
| sdk_host_tool("sdk") { |
| category = "partner" |
| deps = [ ":symbolizer" ] |
| output_name = "symbolizer" |
| } |
| |
| test("symbolizer_tests") { |
| sources = [ |
| "analytics_test.cc", |
| "command_line_options_test.cc", |
| "log_parser_test.cc", |
| "symbolizer_impl_test.cc", |
| ] |
| deps = [ |
| ":src", |
| "//src/lib/files", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| host_test_data("e2e_test_cases") { |
| sources = [ |
| "test_cases/cpp_crasher_klog.in", |
| "test_cases/cpp_crasher_klog.out", |
| "test_cases/cpp_crasher_syslog.in", |
| "test_cases/cpp_crasher_syslog.out", |
| "test_cases/kernel_panic.in", |
| "test_cases/kernel_panic.out", |
| "test_cases/kernel_panic_x64.in", |
| "test_cases/kernel_panic_x64.out", |
| "test_cases/multithread.in", |
| "test_cases/multithread.out", |
| "test_cases/rust_crasher_stdout.in", |
| "test_cases/rust_crasher_stdout.out", |
| "test_cases/rust_crasher_syslog.in", |
| "test_cases/rust_crasher_syslog.out", |
| "test_cases/userboot.in", |
| "test_cases/userboot.out", |
| ] |
| } |
| |
| host_test_data("e2e_test_symbols") { |
| sources = [ "//prebuilt/test_data/symbolizer/symbols" ] |
| } |
| |
| test("symbolizer_e2e_tests") { |
| sources = [ "e2e_test.cc" ] |
| deps = [ |
| ":e2e_test_cases", |
| ":e2e_test_symbols", |
| ":src", |
| "//third_party/googletest:gtest", |
| ] |
| environments = [ |
| { |
| dimensions = host_env.dimensions |
| tags = [ "symbolizer-e2e" ] |
| }, |
| ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":symbolizer_tests($host_toolchain)" ] |
| } |
| |
| group("e2e_tests") { |
| testonly = true |
| deps = [ ":symbolizer_e2e_tests($host_toolchain)" ] |
| } |