blob: e8822de55e7bb4e2832ce111dcfa7fb3ab60e1a1 [file] [log] [blame]
# Copyright 2020 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")
import("//build/cpp/sdk_source_set.gni")
group("tests") {
testonly = true
deps = [ ":driver2-tests" ]
}
sdk_source_set("record") {
category = "experimental"
sdk_name = "driver2-record"
include_base = "//sdk"
sources = [ "record.h" ]
public_deps = [ "//sdk/lib/driver_runtime:driver_runtime" ]
}
source_set("devfs_exporter") {
sources = [
"devfs_exporter.cc",
"devfs_exporter.h",
]
deps = [ ":llcpp" ]
public_deps = [ "//sdk/fidl/fuchsia.device.fs:fuchsia.device.fs_llcpp" ]
}
source_set("inspect") {
sources = [
"inspect.cc",
"inspect.h",
]
public_deps = [
"//sdk/lib/sys/component/llcpp",
"//src/lib/storage/vfs/cpp",
"//zircon/system/ulib/inspect",
]
}
sdk_source_set("llcpp") {
category = "experimental"
sdk_name = "driver2-llcpp"
include_base = "//sdk"
sources = [
"driver2.h",
"logger.cc",
"logger.h",
"logger_internal.h",
"namespace.cc",
"namespace.h",
"promise.cc",
"promise.h",
"record_cpp.h",
"runtime.h",
"runtime_connector_impl.cc",
"runtime_connector_impl.h",
"start_args.h",
"structured_logger.h",
]
public_deps = [
":record",
"//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner_llcpp",
"//sdk/fidl/fuchsia.data:fuchsia.data_llcpp",
"//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_driver",
"//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_llcpp",
"//sdk/fidl/fuchsia.logger:fuchsia.logger_llcpp",
"//sdk/lib/driver_runtime:driver_runtime_cpp",
"//sdk/lib/fdio",
"//sdk/lib/fit-promise",
"//sdk/lib/syslog/structured_backend",
]
}
executable("llcpp_test") {
testonly = true
sources = [
"devfs_exporter_test.cc",
"logger_test.cc",
"namespace_test.cc",
"runtime_connector_impl_test.cc",
"start_args_test.cc",
"test_base.cc",
"test_base.h",
]
deps = [
":devfs_exporter",
":llcpp",
"//sdk/fidl/fuchsia.device.fs",
"//sdk/fidl/fuchsia.io",
"//sdk/fidl/fuchsia.logger",
"//sdk/lib/driver_runtime:driver_runtime_cpp",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/component/llcpp",
"//src/devices/lib/driver:driver_runtime",
"//src/diagnostics/lib/cpp-log-decoder:lib",
"//src/lib/diagnostics/accessor2logger",
"//src/lib/fsl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//third_party/rapidjson",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/service:service-llcpp",
]
# TODO(fxbug.dev/94768): This target uses mutable tables which are deprecated,
# rather than builders.
configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ]
}
fuchsia_unittest_component("driver2-llcpp-test") {
manifest = "meta/llcpp_test.cml"
deps = [ ":llcpp_test" ]
}
fuchsia_test_package("driver2-tests") {
test_components = [ ":driver2-llcpp-test" ]
}