| # Copyright 2018 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/config/fuchsia/rules.gni") |
| import("//build/driver_package.gni") |
| import("//build/test/test_package.gni") |
| |
| group("test") { |
| testonly = true |
| deps = [ |
| ":wlanif-test", |
| ":wlanif-test-driver", |
| ] |
| } |
| |
| driver_module("wlanif-test-driver") { |
| output_name = "wlanif-test" |
| |
| sources = [ "binding.c" ] |
| |
| deps = [ |
| "//garnet/lib/wlan/protocol", |
| "//src/connectivity/wlan/lib/common/cpp:common", |
| "//src/devices/lib/driver", |
| "//zircon/public/lib/zx", |
| ] |
| |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ |
| "//build/config/fuchsia:enable_zircon_asserts", |
| "//build/config/fuchsia:static_cpp_standard_library", |
| ] |
| } |
| |
| driver_package("wlanif-test") { |
| deps = [ ":wlanif-test-driver" ] |
| |
| drivers = [ |
| { |
| name = "wlanif-test.so" |
| }, |
| ] |
| } |
| |
| executable("convert_unittest") { |
| output_name = "wlanif_convert_unittest" |
| |
| testonly = true |
| |
| sources = [ "convert_unittest.cc" ] |
| |
| deps = [ |
| "//src/connectivity/wlan/drivers/wlanif:test_source", |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| executable("device_unittest") { |
| output_name = "wlanif_device_unittest" |
| |
| testonly = true |
| |
| sources = [ "device_unittest.cc" ] |
| |
| deps = [ |
| "//src/connectivity/wlan/drivers/wlanif:test_source", |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//src/devices/lib/driver", |
| "//src/devices/testing/fake_ddk", |
| "//src/lib/ddk", |
| "//src/lib/ddk", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| executable("impl_unittest") { |
| output_name = "wlanif_impl_unittest" |
| |
| testonly = true |
| |
| sources = [ "impl_unittest.cc" ] |
| |
| deps = [ |
| "//garnet/lib/wlan/protocol", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| unittest_package("wlanif_unittest") { |
| deps = [ |
| ":convert_unittest", |
| ":device_unittest", |
| ":impl_unittest", |
| ] |
| |
| tests = [ |
| { |
| name = "wlanif_device_unittest" |
| environments = basic_envs |
| }, |
| { |
| name = "wlanif_impl_unittest" |
| environments = basic_envs |
| }, |
| { |
| name = "wlanif_convert_unittest" |
| environments = basic_envs |
| }, |
| ] |
| } |