blob: fd38372c7ab78524a55cba2fc11eb701e5a0051a [file] [log] [blame] [edit]
# 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/testing/environments.gni")
source_set("lib") {
sources = [ "log.cc" ]
public = [ "log.h" ]
deps = [
"//zircon/system/ulib/syslog",
"//zircon/system/ulib/zx",
]
public_deps = [ "//sdk/fidl/fuchsia.logger" ]
}
executable("bin") {
output_name = "log"
sources = [ "main.cc" ]
deps = [
":lib",
"//sdk/fidl/fuchsia.logger",
"//sdk/lib/sys/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_shell_package("log") {
deps = [ ":bin" ]
manifest = "log.cmx"
}
executable("tools_log_test_bin") {
testonly = true
sources = [ "test.cc" ]
deps = [
":lib",
"//sdk/fidl/fuchsia.logger",
"//sdk/lib/sys/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//zircon/system/ulib/syslog",
]
}
fuchsia_unittest_package("tools_log_test") {
deps = [ ":tools_log_test_bin" ]
}
group("tests") {
testonly = true
public_deps = [ ":tools_log_test" ]
}