blob: 6cb0b05746c66a825ac2675bb9c576b7e58854e9 [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("bind-fail-test-bind") {
disable_autobind = true
header_output = "bind-fail-test-bind.h"
}
fuchsia_driver("fuchsia_driver") {
output_name = "bind-fail-test-driver"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "driver.cc" ]
deps = [
":bind-fail-test-bind",
"//src/devices/lib/driver",
"//src/lib/ddk",
]
visibility = [
":*",
"//src/devices/bundles:drivers",
]
}
fuchsia_driver_component("driver") {
component_name = "bind-fail-test-driver"
deps = [ ":fuchsia_driver" ]
info = "driver-info.json"
colocate = true
}
test("tests") {
output_name = "bind-fail-test"
testonly = true
sources = [ "test.cc" ]
deps = [
"//sdk/fidl/fuchsia.device:fuchsia.device_cpp_wire",
"//sdk/lib/fdio",
"//src/devices/testing/devmgr-integration-test-shim",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
visibility = [ ":*" ]
# 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" ]
}
fuchsia_unittest_package("bind-fail-test") {
deps = [
":driver",
":tests",
"//src/devices/misc/drivers/test",
"//src/devices/misc/drivers/test-parent",
]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}