blob: 262a5be96ae993a7cad45aa0678dce91e7a0904d [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/config/fuchsia/rules.gni")
import("//build/fidl/fidl.gni")
bind_rules("mock-device-bind") {
rules = "mock-device.bind"
output = "mock-device-bind.h"
deps = [ "//src/devices/bind/fuchsia.test" ]
disable_autobind = true
}
driver_module("mock-device") {
test = true
testonly = true
sources = [
"device.cc",
"fidl.cc",
]
deps = [
":fuchsia.device.mock_llcpp",
":mock-device-bind",
"//sdk/banjo/fuchsia.hardware.test",
"//sdk/lib/fdio",
"//sdk/lib/fidl/cpp:cpp_base",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fidl",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
fidl("fuchsia.device.mock") {
testonly = true
sources = [ "mock-device.test.fidl" ]
public_deps = [ "//zircon/vdso/zx" ]
}