1f1549183Sopenharmony_ci# Copyright (C) 2023 Huawei Device Co., Ltd. 2f1549183Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3f1549183Sopenharmony_ci# you may not use this file except in compliance with the License. 4f1549183Sopenharmony_ci# You may obtain a copy of the License at 5f1549183Sopenharmony_ci# 6f1549183Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7f1549183Sopenharmony_ci# 8f1549183Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9f1549183Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10f1549183Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11f1549183Sopenharmony_ci# See the License for the specific language governing permissions and 12f1549183Sopenharmony_ci# limitations under the License. 13f1549183Sopenharmony_ci 14f1549183Sopenharmony_ciimport("//build/test.gni") 15f1549183Sopenharmony_ciimport("//foundation/communication/wifi/wifi/wifi.gni") 16f1549183Sopenharmony_cimodule_output_path = "wifi/native_test" 17f1549183Sopenharmony_ci 18f1549183Sopenharmony_ciconfig("module_private_config") { 19f1549183Sopenharmony_ci visibility = [ ":*" ] 20f1549183Sopenharmony_ci include_dirs = [ 21f1549183Sopenharmony_ci "//commonlibrary/c_utils/base/include", 22f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/test/wifi_standard/native", 23f1549183Sopenharmony_ci ] 24f1549183Sopenharmony_ci} 25f1549183Sopenharmony_ci 26f1549183Sopenharmony_ciohos_unittest("native_unittest") { 27f1549183Sopenharmony_ci module_out_path = module_output_path 28f1549183Sopenharmony_ci sources = [ 29f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/frameworks/native/src/wifi_device_callback_stub.cpp", 30f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/frameworks/native/src/wifi_hotspot_callback_stub.cpp", 31f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/frameworks/native/src/wifi_p2p_callback_stub.cpp", 32f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/frameworks/native/src/wifi_scan_callback_stub.cpp", 33f1549183Sopenharmony_ci "Mock/mock_wifi_c_device.cpp", 34f1549183Sopenharmony_ci "wifi_c_device_test.cpp", 35f1549183Sopenharmony_ci "wifi_c_event_test.cpp", 36f1549183Sopenharmony_ci "wifi_c_hid2d_test.cpp", 37f1549183Sopenharmony_ci "wifi_c_hotspot_test.cpp", 38f1549183Sopenharmony_ci "wifi_c_p2p_test.cpp", 39f1549183Sopenharmony_ci "wifi_c_utils_test.cpp", 40f1549183Sopenharmony_ci "wifi_device_callback_stub_test.cpp", 41f1549183Sopenharmony_ci "wifi_hotspot_callback_stub_test.cpp", 42f1549183Sopenharmony_ci "wifi_inner_device_test.cpp", 43f1549183Sopenharmony_ci "wifi_inner_hotspot_test.cpp", 44f1549183Sopenharmony_ci "wifi_inner_p2p_test.cpp", 45f1549183Sopenharmony_ci "wifi_inner_scan_test.cpp", 46f1549183Sopenharmony_ci "wifi_msg_test.cpp", 47f1549183Sopenharmony_ci "wifi_p2p_callback_stub_test.cpp", 48f1549183Sopenharmony_ci "wifi_p2p_msg_test.cpp", 49f1549183Sopenharmony_ci "wifi_scan_callback_stub_test.cpp", 50f1549183Sopenharmony_ci ] 51f1549183Sopenharmony_ci 52f1549183Sopenharmony_ci include_dirs = [ 53f1549183Sopenharmony_ci "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 54f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/interfaces", 55f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/frameworks/native", 56f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper", 57f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_toolkit/log/", 58f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/test/wifi_standard/native/Mock", 59f1549183Sopenharmony_ci "//third_party/googletest/googlemock/include", 60f1549183Sopenharmony_ci "//third_party/googletest/googletest/include", 61f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/utils/inc", 62f1549183Sopenharmony_ci ] 63f1549183Sopenharmony_ci ldflags = [ 64f1549183Sopenharmony_ci "-fPIC", 65f1549183Sopenharmony_ci "--coverage", 66f1549183Sopenharmony_ci ] 67f1549183Sopenharmony_ci deps = [ 68f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/frameworks/native:wifi_sdk", 69f1549183Sopenharmony_ci "$WIFI_ROOT_DIR/utils:wifi_utils", 70f1549183Sopenharmony_ci "//third_party/googletest:gmock_main", 71f1549183Sopenharmony_ci "//third_party/googletest:gtest_main", 72f1549183Sopenharmony_ci ] 73f1549183Sopenharmony_ci 74f1549183Sopenharmony_ci external_deps = [ 75f1549183Sopenharmony_ci "c_utils:utils", 76f1549183Sopenharmony_ci "hilog:libhilog", 77f1549183Sopenharmony_ci "ipc:ipc_single", 78f1549183Sopenharmony_ci ] 79f1549183Sopenharmony_ci 80f1549183Sopenharmony_ci part_name = "wifi" 81f1549183Sopenharmony_ci subsystem_name = "communication" 82f1549183Sopenharmony_ci} 83