| # 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/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", |
| ":scanner_tests", |
| ":service_tests", |
| ":timer_manager_tests", |
| ] |
| } |
| |
| source_set("test_main") { |
| testonly = true |
| |
| sources = [ |
| "mock_device.h", |
| "test_bss.cpp", |
| "test_bss.h", |
| "test_data.cpp", |
| "test_data.h", |
| "test_main.cpp", |
| "test_timer.cpp", |
| "test_timer.h", |
| "test_utils.cpp", |
| "test_utils.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/lib/wlan/mlme", |
| "//garnet/public/lib/timekeeper:testing", |
| ] |
| |
| deps = [ |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| } |
| |
| executable("ap_mlme_tests") { |
| output_name = "wlan_ap_mlme_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "ap_mlme_unittest.cpp", |
| "beacon_sender_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/common", |
| "//garnet/lib/wlan/mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| } |
| |
| executable("client_mlme_tests") { |
| output_name = "wlan_client_mlme_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "client_mlme_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/common", |
| "//garnet/lib/wlan/mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| } |
| |
| executable("mac_tests") { |
| output_name = "wlan_mac_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "assoc_ctx_unittest.cpp", |
| "channel_unittest.cpp", |
| "element_fidl_unittest.cpp", |
| "element_splitter_unittest.cpp", |
| "element_unittest.cpp", |
| "energy_unittest.cpp", |
| "frame_validation_unittest.cpp", |
| "join_context_unittest.cpp", |
| "mac_frame_unittest.cpp", |
| "macaddr_unittest.cpp", |
| "mcs_unittest.cpp", |
| "packet_unittest.cpp", |
| "parse_beacon_unittest.cpp", |
| "parse_element_unittest.cpp", |
| "parse_mac_header_unittest.cpp", |
| "sequence_unittest.cpp", |
| "tim_element_unittest.cpp", |
| "tim_unittest.cpp", |
| "tx_vector_unittest.cpp", |
| "write_element_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| } |
| |
| executable("mesh_tests") { |
| output_name = "wlan_mesh_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "hwmp_unittest.cpp", |
| "mesh_deduplicator_unittest.cpp", |
| "mesh_mlme_unittest.cpp", |
| "parse_mp_action_unittest.cpp", |
| "write_mp_action_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/common", |
| "//garnet/lib/wlan/mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| } |
| |
| executable("scanner_tests") { |
| output_name = "wlan_scanner_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "scanner_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/mlme", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| } |
| |
| executable("service_tests") { |
| output_name = "wlan_service_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "service_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/mlme", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fit", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| } |
| |
| executable("timer_manager_tests") { |
| output_name = "wlan_timer_manager_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "timer_manager_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/mlme", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fit", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| } |
| |
| executable("buffer_utils_tests") { |
| output_name = "wlan_buffer_utils_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "buffer_utils_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/common", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| } |
| |
| executable("common_tests") { |
| output_name = "wlan_common_unittest" |
| |
| testonly = true |
| |
| sources = [ |
| "channel_scheduler_unittest.cpp", |
| "device_caps_unittest.cpp", |
| "moving_average_unittest.cpp", |
| "rates_elements_unittest.cpp", |
| "span_unittest.cpp", |
| "stats_unittest.cpp", |
| ] |
| |
| deps = [ |
| ":test_main", |
| "//garnet/lib/wlan/common", |
| "//garnet/public/fidl/fuchsia.wlan.stats", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "//garnet/lib/wlan/mlme:wlan_mlme_config" ] |
| } |
| |
| package("wlan_tests") { |
| testonly = true |
| deprecated_system_image = true |
| |
| deps = [ |
| ":tests", |
| "//garnet/drivers/wlan/testing", |
| ] |
| |
| binaries = [ |
| { |
| name = "rust_crates/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_scanner_unittest" |
| }, |
| |
| { |
| name = "wlan_service_unittest" |
| }, |
| |
| { |
| name = "wlan_timer_manager_unittest" |
| }, |
| |
| { |
| name = "wlan_common_unittest" |
| }, |
| ] |
| |
| drivers = [ |
| { |
| name = "wlanphy-testdev.so" |
| }, |
| ] |
| } |