blob: 2b512b86e50fb91733b2d8e61a7a025915eba14b [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("i8042_bind") {
rules = "i8042.bind"
header_output = "i8042_bind.h"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/fuchsia.acpi",
"//src/devices/bind/fuchsia.driver.framework",
]
}
group("tests") {
testonly = true
deps = [
":i8042_bind_test",
":pc-ps2-tests",
]
}
common_deps = [
":i8042_bind_header",
"//sdk/banjo/fuchsia.hardware.hidbus:fuchsia.hardware.hidbus_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.input:fuchsia.hardware.input_llcpp",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/hid",
"//zircon/system/ulib/hwreg",
]
fuchsia_driver("pc-ps2-driver") {
output_name = "pc-ps2"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [
"controller.cc",
"device.cc",
]
deps = common_deps
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
fuchsia_driver_component("pc-ps2") {
component_name = "pc-ps2"
deps = [
":i8042_bind",
":pc-ps2-driver",
]
info = "pc-ps2-info.json"
root_resource = true
}
test("pc-ps2-tests-bin") {
output_name = "pc-ps2-tests"
sources = [
"controller.cc",
"device.cc",
"unit-tests.cc",
]
deps = common_deps + [
"//src/devices/testing/mock-ddk",
"//zircon/system/ulib/zxtest",
]
# TODO(fxbug.dev/99745): remove this
defines = [ "PS2_TEST" ]
}
fuchsia_unittest_package("pc-ps2-tests") {
deps = [ ":pc-ps2-tests-bin" ]
}