blob: 689bd2fe3b6adc054ffe41389ad7146a7aa34514 [file] [log] [blame]
# Copyright 2019 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/bind/bind.gni")
import("//build/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")
driver_bind_rules("ddk-fidl-bind") {
rules = "ddk-fidl.bind"
deps = [ "//src/devices/bind/fuchsia.test.platform" ]
}
fuchsia_driver("fidl-llcpp-driver-driver") {
output_name = "fidl-llcpp-driver"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "fidl-llcpp-driver.cc" ]
deps = [
":ddk-fidl-bind",
"//src/devices/lib/driver",
"//src/devices/tests/fuchsia-hardware-test:fuchsia.hardware.test_cpp",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver_component("fidl-llcpp-driver") {
component_name = "fidl-llcpp-driver"
deps = [ ":fidl-llcpp-driver-driver" ]
info = "fidl-llcpp-driver-info.json"
manifest = "meta/fidl-llcpp-driver.cml"
}
driver_bind_rules("ddk-fidl-async-bind") {
rules = "ddk-fidl-async.bind"
deps = [ "//src/devices/bind/fuchsia.test.platform" ]
}
fuchsia_driver("fidl-async-llcpp-driver-driver") {
output_name = "fidl-async-llcpp-driver"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "fidl-async-llcpp-driver.cc" ]
deps = [
":ddk-fidl-async-bind",
"//src/devices/lib/driver",
"//src/devices/tests/fuchsia-hardware-test:fuchsia.hardware.test_cpp",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver_component("fidl-async-llcpp-driver") {
component_name = "fidl-async-llcpp-driver"
deps = [ ":fidl-async-llcpp-driver-driver" ]
info = "fidl-async-llcpp-driver-info.json"
manifest = "meta/fidl-async-llcpp-driver.cml"
}
test("ddk-fidl-test") {
sources = [ "test.cc" ]
deps = [
"//sdk/lib/fdio",
"//sdk/lib/fidl",
"//src/devices/testing/driver-integration-test-shim",
"//src/devices/tests/fuchsia-hardware-test:fuchsia.hardware.test_cpp",
"//src/lib/ddk",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("ddk-fidl-test-package") {
package_name = "ddk-fidl-test"
deps = [
":ddk-fidl-test",
":fidl-async-llcpp-driver",
":fidl-llcpp-driver",
"//src/devices/board/drivers/integration-test",
"//src/devices/bus/drivers/platform",
]
}
group("tests") {
testonly = true
deps = [ ":ddk-fidl-test-package" ]
}