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