blob: 4434f715b3fc19d8e6dd4ac9554faa6fd02771bb [file] [log] [blame]
# Copyright 2018 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")
import("//build/testing/environments.gni")
group("harvester") {
testonly = true
deps = [
":bin",
":system_monitor_harvester",
":system_monitor_harvester_test",
]
}
source_set("lib") {
sources = [
"dockyard_proxy.cc",
"dockyard_proxy.h",
"dockyard_proxy_grpc.cc",
"dockyard_proxy_grpc.h",
"gather_category.cc",
"gather_category.h",
"gather_cpu.cc",
"gather_cpu.h",
"gather_inspectable.cc",
"gather_inspectable.h",
"gather_introspection.cc",
"gather_introspection.h",
"gather_memory.cc",
"gather_memory.h",
"gather_memory_digest.cc",
"gather_memory_digest.h",
"gather_processes_and_memory.cc",
"gather_processes_and_memory.h",
"gather_tasks.cc",
"gather_tasks.h",
"gather_threads_and_cpu.cc",
"gather_threads_and_cpu.h",
"harvester.cc",
"harvester.h",
"root_resource.cc",
"root_resource.h",
"sample_bundle.cc",
"sample_bundle.h",
"task_tree.cc",
"task_tree.h",
]
public_deps = [
"//src/developer/memory/metrics",
"//src/developer/system_monitor/lib/dockyard:lib",
"//src/developer/system_monitor/lib/dockyard:proto",
"//src/lib/fsl",
"//src/lib/fxl",
"//src/lib/inspect_deprecated/query",
"//src/lib/syslog/cpp",
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
"//zircon/system/fidl/fuchsia-boot:fuchsia-boot_c",
"//zircon/system/ulib/task-utils",
]
}
executable("bin") {
output_name = "system_monitor_harvester"
sources = [
"dockyard_proxy_local.cc",
"dockyard_proxy_local.h",
"harvester_main.cc",
]
deps = [
":lib",
"//third_party/grpc:grpc++",
]
}
package("system_monitor_harvester") {
deps = [ ":bin" ]
binaries = [
{
name = "system_monitor_harvester"
},
]
meta = [
{
path = rebase_path("meta/system_monitor_harvester.cmx")
dest = "system_monitor_harvester.cmx"
},
]
}
executable("system_monitor_harvester_test") {
testonly = true
sources = [
"dockyard_proxy_fake.cc",
"dockyard_proxy_fake.h",
"dockyard_proxy_grpc_test.cc",
"gather_cpu_test.cc",
"gather_inspectable_test.cc",
"gather_introspection_test.cc",
"gather_memory_digest_test.cc",
"gather_memory_test.cc",
"gather_processes_and_memory_test.cc",
"gather_tasks_test.cc",
"gather_threads_and_cpu_test.cc",
"harvester_fake.h",
"harvester_test.cc",
"root_resource_test.cc",
"sample_bundle_test.cc",
"task_tree_test.cc",
]
deps = [
":lib",
"//garnet/public/lib/gtest",
"//sdk/lib/sys/cpp/testing:unit",
"//src/lib/fxl/test:gtest_main",
]
# TODO(46848): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
test_package("system_monitor_harvester_tests") {
deps = [ ":system_monitor_harvester_test" ]
tests = [
{
name = "system_monitor_harvester_test"
environments = basic_envs
},
]
}