blob: 44fb60164491b0ca488a127e465dc224bbd3c239 [file] [log] [blame]
# Copyright 2019 The Chromium OS 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("//common-mk/pkg_config.gni")
import("//common-mk/proto_library.gni")
group("all") {
deps = [
":diagnostics_dpsl_demo_vm",
":diagnostics_dpsl_test_listener",
":diagnostics_dpsl_test_requester",
]
if (use.test) {
deps += [ ":libdpsl_test" ]
}
}
# Library that provides the DPSL (diagnostics processor support library)
# interface.
pkg_config("libdpsl_pkg_deps") {
pkg_deps = [
"libbrillo",
"libchrome-${libbase_ver}",
]
}
source_set("libdpsl") {
deps = [
"//diagnostics/constants:libconstants",
"//diagnostics/grpc:wilco_dtc_grpc_protos",
"//diagnostics/grpc_async_adapter:libgrpc_async_adapter",
]
configs += [ ":libdpsl_pkg_deps" ]
sources = [
"internal/dpsl_global_context_impl.cc",
"internal/dpsl_requester_impl.cc",
"internal/dpsl_rpc_server_impl.cc",
"internal/dpsl_thread_context_impl.cc",
]
}
source_set("libdpslutil") {
deps = [
":libdpsl",
]
configs += [ ":libdpsl_pkg_deps" ]
sources = [
"test_utils/common.cc",
]
}
# Executables for DPSL demos.
executable("diagnostics_dpsl_demo_vm") {
deps = [
":libdpsl",
"//diagnostics/grpc:wilco_dtc_grpc_protos",
]
sources = [
"demo_single_thread/main.cc",
]
}
# Executables for E2E VM tests.
executable("diagnostics_dpsl_test_listener") {
deps = [
":libdpslutil",
"//diagnostics/grpc:wilco_dtc_grpc_protos",
]
sources = [
"test_utils/listener.cc",
]
}
# Executables for E2E VM tests.
executable("diagnostics_dpsl_test_requester") {
deps = [
":libdpslutil",
"//diagnostics/grpc:wilco_dtc_grpc_protos",
]
sources = [
"test_utils/requester.cc",
]
}
if (use.test) {
pkg_config("libdpsl_test_pkg_deps") {
pkg_deps = [
"libchrome-${libbase_ver}",
"libchrome-test-${libbase_ver}",
]
}
executable("libdpsl_test") {
configs += [
":libdpsl_test_pkg_deps",
"//common-mk:test",
]
deps = [
":libdpsl",
"../../common-mk/testrunner:testrunner",
]
sources = [
"internal/dpsl_global_context_impl_test.cc",
"internal/dpsl_requester_impl_test.cc",
"internal/dpsl_rpc_server_impl_test.cc",
"internal/dpsl_thread_context_impl_test.cc",
"internal/test_dpsl_background_thread.cc",
]
}
}