| # 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/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/trace-engine", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| 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/public/lib/zircon-internal", |
| "//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:trace-provider-with-fdio", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| package("ktrace_provider") { |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| name = "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", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fbl", |
| "//zircon/system/ulib/trace-engine", |
| "//zircon/system/ulib/trace-test-utils", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| test_package("ktrace_provider_tests") { |
| deps = [ ":importer_test_app" ] |
| |
| tests = [ |
| { |
| name = "importer_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |