blob: 339635f96339d428a3575381a26864f2e67e6620 [file] [log] [blame]
# Copyright 2021 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")
source_set("lib") {
testonly = true
sources = [
"abstract_data_processor.h",
"cache.h",
"common.h",
"data_processor.cc",
"data_processor.h",
"debug_data.cc",
"debug_data.h",
"event_stream.cc",
"event_stream.h",
]
public_deps = [
"//sdk/fidl/fuchsia.debugdata",
"//sdk/fidl/fuchsia.sys2",
"//sdk/fidl/fuchsia.test.internal",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
"//src/lib/json_parser",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/debugdata",
]
}
executable("bin") {
testonly = true
output_name = "debug_data"
sources = [ "main.cc" ]
deps = [
":lib",
"//sdk/fidl/fuchsia.sys2",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_component("debug_data") {
testonly = true
deps = [ ":bin" ]
manifest = "meta/debug_data.cml"
}
executable("test_bin") {
testonly = true
output_name = "debug_data_unittests"
sources = [
"cache_unittests.cc",
"data_processor_unittests.cc",
"debug_data_unittests.cc",
"event_stream_unittests.cc",
]
deps = [
":lib",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_component("debug_data_unittests_component") {
testonly = true
component_name = "debug_data_unittests"
deps = [ ":test_bin" ]
manifest = "meta/debug_data_unittests.cmx"
}
fuchsia_test_package("debug_data_unittests") {
test_components = [ ":debug_data_unittests_component" ]
}
group("tests") {
testonly = true
deps = [ ":debug_data_unittests" ]
}