| # 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("//packages/package.gni") |
| |
| executable("bin") { |
| output_name = "trace" |
| |
| sources = [ |
| "main.cc", |
| ] |
| |
| deps = [ |
| ":trace_app", |
| ] |
| } |
| |
| source_set("trace_app") { |
| sources = [ |
| "app.cc", |
| "app.h", |
| "command.cc", |
| "command.h", |
| "commands/dump_provider.cc", |
| "commands/dump_provider.h", |
| "commands/list_categories.cc", |
| "commands/list_categories.h", |
| "commands/list_providers.cc", |
| "commands/list_providers.h", |
| "commands/record.cc", |
| "commands/record.h", |
| "results_output.cc", |
| "results_output.h", |
| "results_upload.cc", |
| "results_upload.h", |
| "spec.cc", |
| "spec.h", |
| "tracer.cc", |
| "tracer.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/lib/measure", |
| "//garnet/lib/trace_converters:chromium", |
| "//garnet/public/lib/app/cpp", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/fxl", |
| "//garnet/public/lib/network/fidl", |
| "//garnet/public/lib/tracing/fidl", |
| "//zircon/system/ulib/trace-reader", |
| ] |
| |
| deps = [ |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| source_set("unittests") { |
| testonly = true |
| |
| sources = [ |
| "spec_unittest.cc", |
| ] |
| |
| deps = [ |
| ":trace_app", |
| "//garnet/public/lib/fxl", |
| "//third_party/gtest", |
| ] |
| } |
| |
| package("trace") { |
| deps = [ |
| ":bin", |
| ] |
| |
| binaries = [ { |
| name = "trace" |
| } ] |
| |
| # If your build includes the target trace tool, your $host_tools_dir |
| # contains the utilities to work with traces copied from the target. |
| data_deps = [ |
| "//garnet/bin/traceutils", |
| ] |
| } |
| |
| executable("trace_tests_bin") { |
| testonly = true |
| |
| output_name = "trace_tests" |
| |
| deps = [ |
| "//garnet/bin/trace:unittests", |
| "//garnet/lib/measure:unittests", |
| "//garnet/public/lib/test_runner/cpp:gtest_main", |
| ] |
| } |
| |
| package("trace_tests") { |
| testonly = true |
| |
| deps = [ |
| ":trace_tests_bin", |
| ] |
| |
| tests = [ { |
| name = "trace_tests" |
| |
| # Disabled because several tests are crashing on release builds. |
| disabled = true |
| } ] |
| } |