| # 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/package.gni") |
| import("//build/test/test_package.gni") |
| |
| source_set("importer") { |
| sources = [ |
| "importer.cc", |
| "importer.h", |
| "reader.cc", |
| "reader.h", |
| "tags.cc", |
| "tags.h", |
| ] |
| |
| public_deps = [ |
| "//src/lib/fxl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/trace-engine", |
| "//zircon/public/lib/zircon-internal", |
| ] |
| } |
| |
| 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/lib/sys/cpp", |
| "//src/lib/fxl", |
| "//zircon/public/fidl/fuchsia-tracing-kernel:fuchsia-tracing-kernel_c", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/trace", |
| "//zircon/public/lib/trace-provider", |
| "//zircon/public/lib/zircon-internal", |
| ] |
| } |
| |
| package("ktrace_provider") { |
| deps = [ |
| ":bin", |
| ] |
| |
| binary = "ktrace_provider" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/ktrace_provider.cmx") |
| dest = "ktrace_provider.cmx" |
| }, |
| ] |
| } |
| |
| 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", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/trace-engine", |
| "//zircon/public/lib/trace-test-utils", |
| ] |
| } |
| |
| test_package("ktrace_provider_tests") { |
| deps = [ |
| ":importer_test_app" |
| ] |
| |
| tests = [ |
| { |
| name = "importer_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |