| # Copyright 2017 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/driver_package.gni") |
| import("//build/test/test_package.gni") |
| |
| config("wlan_mlme_tests_config") { |
| include_dirs = [ "." ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":ap_mlme_tests", |
| ":buffer_utils_tests", |
| ":client_mlme_tests", |
| ":common_tests", |
| ":mac_tests", |
| ":mesh_tests", |
| ":service_tests", |
| ":timer_manager_tests", |
| ] |
| } |
| |
| source_set("test_main") { |
| testonly = true |
| |
| sources = [ |
| "mock_device.h", |
| "test_bss.cc", |
| "test_bss.h", |
| "test_data.cc", |
| "test_data.h", |
| "test_main.cc", |
| "test_timer.h", |
| "test_utils.cc", |
| "test_utils.h", |
| ] |
| |
| public_deps = [ |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//src/lib/timekeeper:testing", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.wlan.ieee80211", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config" ] |
| } |
| |
| executable("ap_mlme_tests") { |
| output_name = "wlan_ap_mlme_unittest" |
| |
| testonly = true |
| |
| sources = [ "ap_mlme_unittest.cc" ] |
| |
| deps = [ |
| ":test_main", |
| "//sdk/fidl/fuchsia.wlan.ieee80211", |
| "//src/connectivity/wlan/lib/common/cpp:common", |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ |
| "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| } |
| |
| executable("client_mlme_tests") { |
| output_name = "wlan_client_mlme_unittest" |
| |
| testonly = true |
| |
| sources = [ "client_mlme_unittest.cc" ] |
| |
| deps = [ |
| ":test_main", |
| "//src/connectivity/wlan/lib/common/cpp:common", |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ |
| "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| } |
| |
| executable("mac_tests") { |
| output_name = "wlan_mac_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "channel_unittest.cc", |
| "element_splitter_unittest.cc", |
| "element_unittest.cc", |
| "energy_unittest.cc", |
| "frame_validation_unittest.cc", |
| "mac_frame_unittest.cc", |
| "macaddr_unittest.cc", |
| "mcs_unittest.cc", |
| "packet_unittest.cc", |
| "parse_element_unittest.cc", |
| "parse_mac_header_unittest.cc", |
| "perr_destination_parser_unittest.cc", |
| "rate_limiter_unittest.cc", |
| "tim_element_unittest.cc", |
| "tim_unittest.cc", |
| "tx_vector_unittest.cc", |
| "write_element_unittest.cc", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config" ] |
| } |
| |
| executable("mesh_tests") { |
| output_name = "wlan_mesh_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "hwmp_unittest.cc", |
| "mesh_deduplicator_unittest.cc", |
| "mesh_mlme_unittest.cc", |
| "parse_mp_action_unittest.cc", |
| "write_mp_action_unittest.cc", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//src/connectivity/wlan/lib/common/cpp:common", |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ |
| "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| } |
| |
| executable("service_tests") { |
| output_name = "wlan_service_unittest" |
| |
| testonly = true |
| |
| sources = [ "service_unittest.cc" ] |
| |
| deps = [ |
| ":test_main", |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fit", |
| ] |
| |
| configs += [ "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config" ] |
| } |
| |
| executable("timer_manager_tests") { |
| output_name = "wlan_timer_manager_unittest" |
| |
| testonly = true |
| |
| sources = [ "timer_manager_unittest.cc" ] |
| |
| deps = [ |
| ":test_main", |
| "//src/connectivity/wlan/lib/mlme/cpp:mlme", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fit", |
| ] |
| |
| configs += [ "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config" ] |
| } |
| |
| executable("buffer_utils_tests") { |
| output_name = "wlan_buffer_utils_unittest" |
| |
| testonly = true |
| |
| sources = [ "buffer_utils_unittest.cc" ] |
| |
| deps = [ |
| ":test_main", |
| "//src/connectivity/wlan/lib/common/cpp:common", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config" ] |
| } |
| |
| executable("common_tests") { |
| output_name = "wlan_common_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "device_caps_unittest.cc", |
| "moving_average_unittest.cc", |
| "rates_elements_unittest.cc", |
| "span_unittest.cc", |
| "stats_unittest.cc", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//sdk/fidl/fuchsia.wlan.stats", |
| "//src/connectivity/wlan/lib/common/cpp:common", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//src/connectivity/wlan/lib/mlme/cpp:wlan_mlme_config" ] |
| } |
| |
| driver_package("wlanphy-testdev-driver") { |
| testonly = true |
| |
| drivers = [ |
| { |
| name = "wlanphy-testdev.so" |
| }, |
| ] |
| |
| deps = [ "//src/connectivity/wlan/drivers/testing:wlanphy-testdev" ] |
| } |
| |
| test_package("wlan_tests") { |
| deps = [ |
| ":tests", |
| "//src/connectivity/wlan/drivers/testing", |
| ] |
| |
| data_deps = [ ":wlanphy-testdev-driver" ] |
| |
| binaries = [ |
| { |
| name = "wlan_test_util" |
| dest = "wlan-test-util" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "wlan_ap_mlme_unittest" |
| }, |
| |
| { |
| name = "wlan_buffer_utils_unittest" |
| }, |
| |
| { |
| name = "wlan_client_mlme_unittest" |
| }, |
| |
| { |
| name = "wlan_mac_unittest" |
| }, |
| |
| { |
| name = "wlan_mesh_unittest" |
| }, |
| |
| { |
| name = "wlan_service_unittest" |
| }, |
| |
| { |
| name = "wlan_timer_manager_unittest" |
| }, |
| |
| { |
| name = "wlan_common_unittest" |
| }, |
| ] |
| } |