blob: ad95c40f68e8763b1901f04b01180085b7486bea [file] [log] [blame]
# Copyright 2016 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")
source_set("importer") {
sources = [
"importer.cc",
"importer.h",
"reader.cc",
"reader.h",
"tags.cc",
"tags.h",
]
public_deps = [
"//src/lib/fxl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/trace-engine",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
}
executable("bin") {
output_name = "ktrace_provider"
sources = [
"app.cc",
"app.h",
"device_reader.cc",
"device_reader.h",
"log_importer.cc",
"log_importer.h",
"main.cc",
]
deps = [
":importer",
"//sdk/fidl/fuchsia.boot:fuchsia.boot_c",
"//sdk/fidl/fuchsia.tracing.kernel",
"//sdk/lib/fdio",
"//sdk/lib/sys/cpp",
"//src/lib/fxl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider",
"//zircon/system/ulib/zircon-internal",
]
# TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
# Consider switching to the C++ bindings. See linked bug for details.
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}
fuchsia_package_with_single_component("ktrace_provider") {
manifest = "meta/ktrace_provider.cmx"
deps = [ ":bin" ]
}
executable("importer_test_app") {
testonly = true
output_name = "importer_tests"
sources = [
"importer_unittest.cc",
"test_reader.cc",
"test_reader.h",
]
deps = [
":importer",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/trace-engine",
"//zircon/system/ulib/trace-test-utils",
]
}
fuchsia_unittest_package("ktrace_provider_tests") {
deps = [ ":importer_test_app" ]
}