blob: 77ccfcde86a411ad722a0027f33af93c932b138d [file] [log] [blame]
# Copyright 2023 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("driver_bind") {
rules = "meta/testcontroller_driver.bind"
bind_output = "testcontroller_driver.bindbc"
deps = [ "//src/devices/bind/fuchsia.test" ]
}
fuchsia_cc_driver("testcontroller_driver-driver") {
output_name = "testcontroller_driver"
sources = [ "driver.cc" ]
deps = [
":driver_bind",
"./fidl:test.wlan.testcontroller_cpp",
"//sdk/fidl/fuchsia.wlan.fullmac:fuchsia.wlan.fullmac_cpp",
"//sdk/lib/driver/component/cpp",
"//sdk/lib/driver/devfs/cpp",
"//src/connectivity/wlan/drivers/lib/fidl-bridge/cpp:dfv2",
"//src/devices/lib/driver:driver_runtime",
"//zircon/system/ulib/sync:sync-cpp",
]
}
fuchsia_driver_component("testcontroller_driver") {
visibility = [
":*",
"//src/connectivity/wlan:drivers",
"//src/connectivity/wlan/tests/drivers-only/fullmac-tests:*",
]
component_name = "testcontroller_driver"
deps = [ ":testcontroller_driver-driver" ]
info = "meta/testcontroller_driver-info.json"
manifest = "meta/testcontroller_driver.cml"
}
#
# Test definitions
#
rustc_test("testcontroller_driver_test") {
edition = "2021"
testonly = true
source_root = "test/testcontroller_driver_test.rs"
sources = [ "test/testcontroller_driver_test.rs" ]
deps = [
"./fidl:test.wlan.testcontroller_rust",
"//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_rust",
"//sdk/lib/device-watcher/rust",
"//sdk/lib/driver_test_realm/realm_builder/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component-test",
"//third_party/rust_crates:anyhow",
]
}
fuchsia_unittest_package("unit_tests") {
package_name = "wlan_testcontroller_driver_unit_tests"
deps = [
":testcontroller_driver",
":testcontroller_driver_test",
"//src/devices/misc/drivers/test-parent",
]
}
group("tests") {
testonly = true
deps = [ ":unit_tests" ]
}