blob: 379b9da28bf8398621f7b144c5e8db5c1f663430 [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/components.gni")
group("harvester") {
testonly = true
deps = [
":bin",
":system_monitor_harvester",
":system_monitor_harvester_test",
]
}
source_set("lib") {
sources = [
"build_info.cc",
"build_info.h",
"dockyard_proxy.cc",
"dockyard_proxy.h",
"dockyard_proxy_grpc.cc",
"dockyard_proxy_grpc.h",
"fidl.cc",
"fidl.h",
"fuchsia_clock.cc",
"fuchsia_clock.h",
"gather_category.cc",
"gather_category.h",
"gather_channels.cc",
"gather_channels.h",
"gather_cpu.cc",
"gather_cpu.h",
"gather_device_info.cc",
"gather_device_info.h",
"gather_memory.cc",
"gather_memory.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",
"gather_vmos.cc",
"gather_vmos.h",
"harvester.cc",
"harvester.h",
"info_resource.cc",
"info_resource.h",
"log_listener.cc",
"log_listener.h",
"os.h",
"sample_bundle.cc",
"sample_bundle.h",
"task_tree.cc",
"task_tree.h",
"union_find.h",
]
public_deps = [
"//sdk/fidl/fuchsia.diagnostics",
"//sdk/fidl/fuchsia.kernel",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_c",
"//sdk/fidl/fuchsia.sysinfo",
"//sdk/fidl/fuchsia.systemmonitor",
"//sdk/lib/fdio",
"//sdk/lib/fit-promise",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/developer/memory/metrics",
"//src/developer/system_monitor/lib/dockyard:lib",
"//src/developer/system_monitor/lib/dockyard:proto",
"//src/lib/files",
"//src/lib/fsl",
"//src/lib/fxl",
"//src/lib/timekeeper:system",
"//src/zircon/lib/zircon:zircon-headers",
"//zircon/public/lib/async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/task-utils",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider:trace-provider-with-fdio",
]
# TODO(fxb/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
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++",
]
}
fuchsia_component("system_monitor_harvester_legacy") {
component_name = "system_monitor_harvester"
manifest = "meta/system_monitor_harvester.cmx"
deps = [ ":bin" ]
}
fuchsia_component("system_monitor_harvester_fidl") {
component_name = "system_monitor_harvester_fidl"
manifest = "meta/system_monitor_harvester_fidl.cmx"
deps = [ ":bin" ]
}
fuchsia_package("system_monitor_harvester") {
deps = [
":system_monitor_harvester_fidl",
":system_monitor_harvester_legacy",
]
}
executable("system_monitor_harvester_test") {
testonly = true
sources = [
"archive_accessor_stub.cc",
"archive_accessor_stub.h",
"build_info_test.cc",
"dockyard_proxy_fake.cc",
"dockyard_proxy_fake.h",
"dockyard_proxy_grpc_test.cc",
"fuchsia_clock_test.cc",
"gather_channels_test.cc",
"gather_cpu_test.cc",
"gather_device_info_test.cc",
"gather_memory_test.cc",
"gather_processes_and_memory_test.cc",
"gather_threads_and_cpu_test.cc",
"gather_vmos_test.cc",
"harvester_fake.h",
"harvester_test.cc",
"info_resource_test.cc",
"mock_dockyard_stub.h",
"os_test.cc",
"sample_bundle_test.cc",
"task_tree_test.cc",
"union_find_test.cc",
]
deps = [
":lib",
"//garnet/public/lib/gtest",
"//sdk/lib/fdio",
"//sdk/lib/sys/cpp/testing:integration",
"//sdk/lib/sys/cpp/testing:unit",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//src/lib/timekeeper:testing",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//third_party/rapidjson",
]
}
group("tests") {
testonly = true
public_deps = [ ":system_monitor_harvester_tests" ]
}
fuchsia_test_component("system_monitor_harvester_test_component") {
component_name = "system_monitor_harvester_test"
manifest = "meta/system_monitor_harvester_test.cmx"
deps = [ ":system_monitor_harvester_test" ]
}
fuchsia_test_package("system_monitor_harvester_tests") {
test_components = [ ":system_monitor_harvester_test_component" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}