| # 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/components.gni") |
| import("//build/test.gni") |
| import("//build/testing/environments.gni") |
| |
| executable("bin") { |
| output_name = "log" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_hlcpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| ] |
| } |
| |
| fuchsia_package("log") { |
| deps = [ ":bin" ] |
| } |
| |
| test("log_binary_test") { |
| sources = [ "test.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_hlcpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| fuchsia_test_component("log_binary_test_component") { |
| testonly = true |
| |
| manifest = "meta/log_binary_test.cml" |
| |
| deps = [ ":log_binary_test" ] |
| } |
| |
| fuchsia_test_package("tools_log_test") { |
| test_components = [ ":log_binary_test_component" ] |
| deps = [ ":bin" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| public_deps = [ ":tools_log_test" ] |
| } |