blob: 1865bed00312541bbc0dc9fca4c4f8a52aec8eb3 [file] [log] [blame]
# Copyright 2021 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")
bind_test("wlanif_bind_test") {
rules = "//src/connectivity/wlan/drivers/wlanif/wlanif.bind"
tests = "wlanif_bind_test.json"
deps = [ "//sdk/fidl/fuchsia.wlan.fullmac:fuchsia.wlan.fullmac_bindlib" ]
}
executable("device_unittest") {
output_name = "wlanif_device_unittest"
testonly = true
sources = [
"device_unittest.cc",
"test_bss.cc",
"test_bss.h",
]
deps = [
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_cpp",
"//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_cpp",
"//sdk/fidl/fuchsia.wlan.common:fuchsia.wlan.common_banjo_c",
"//sdk/fidl/fuchsia.wlan.common:fuchsia.wlan.common_hlcpp",
"//sdk/fidl/fuchsia.wlan.mlme:fuchsia.wlan.mlme_hlcpp",
"//sdk/fidl/fuchsia.wlan.sme:fuchsia.wlan.sme_hlcpp",
"//sdk/lib/async_patterns/testing/cpp:cpp",
"//sdk/lib/driver/testing/cpp:cpp",
"//sdk/lib/sys/cpp/testing:cpp",
"//src/connectivity/wlan/drivers/wlanif:lib_source",
"//src/lib/fxl/test:gtest_main",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/sync:sync-cpp",
"//zircon/system/ulib/zx",
]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
executable("convert_unittest") {
output_name = "wlanif_convert_unittest"
testonly = true
sources = [ "convert_unittest.cc" ]
deps = [
"//src/connectivity/wlan/drivers/wlanif:lib_source",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/sync:sync-cpp",
"//zircon/system/ulib/zx",
]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
tests = [
"device",
"convert",
]
foreach(test, tests) {
name = "${test}_test"
fuchsia_unittest_component("${name}_component") {
component_name = name
deps = [ ":${test}_unittest" ]
}
}
fuchsia_test_package("wlanif_unittest") {
test_components = []
foreach(test, tests) {
test_components += [ ":${test}_test_component" ]
}
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
deps = [
":wlanif_bind_test",
":wlanif_unittest",
]
}