1# Copyright (c) 2021 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("//drivers/adapter/uhdf2/uhdf.gni") 16 17module_output_path = "hdf/hdi" 18FWK_ROOT_DIR = "//drivers/framework" 19 20###########################palTest########################### 21 22ohos_unittest("WlanHdiServiceTest") { 23 module_out_path = module_output_path 24 sources = [ "wlan_hdi_hal_services_test.cpp" ] 25 26 deps = [ 27 "$hdf_uhdf_path/hdi:libhdi", 28 "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", 29 "$hdf_uhdf_path/osal:libhdf_utils", 30 "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", 31 "//drivers/peripheral/wlan/client:wifi_driver_client", 32 "//drivers/peripheral/wlan/hal:wifi_hal", 33 "//drivers/peripheral/wlan/hdi_service:wifi_hdi_device", 34 "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", 35 "//third_party/googletest:gmock_main", 36 "//third_party/googletest:gtest_main", 37 "//utils/native/base:utils", 38 ] 39 40 include_dirs = [ 41 "include", 42 "//drivers/peripheral/wlan/interfaces/include", 43 "//drivers/peripheral/wlan/hdi_service/services", 44 "//drivers/peripheral/wlan/client/include", 45 "//drivers/peripheral/wlan/hal/include", 46 "//drivers/peripheral/wlan/hdi_service/include", 47 "$FWK_ROOT_DIR/core/shared/include", 48 "$FWK_ROOT_DIR/ability/sbuf/include", 49 "$FWK_ROOT_DIR/include", 50 "$FWK_ROOT_DIR/include/wifi", 51 "$FWK_ROOT_DIR/include/core", 52 "$FWK_ROOT_DIR/include/utils", 53 "//drivers/adapter/uhdf2/include/hdi", 54 "//drivers/adapter/uhdf2/shared/include", 55 "//drivers/adapter/uhdf2/include/host", 56 ] 57 58 if (is_standard_system) { 59 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 60 } else { 61 external_deps = [ "hilog:libhilog" ] 62 } 63} 64 65ohos_unittest("WlanHdiServiceTestC") { 66 module_out_path = module_output_path 67 sources = [ "wlan_hdi_hal_services_c_test.cpp" ] 68 69 deps = [ 70 "$hdf_uhdf_path/hdi:libhdi", 71 "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", 72 "$hdf_uhdf_path/osal:libhdf_utils", 73 "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", 74 "//drivers/peripheral/wlan/client:wifi_driver_client", 75 "//drivers/peripheral/wlan/hal:wifi_hal", 76 "//drivers/peripheral/wlan/hdi_service:wifi_hdi_c_device", 77 "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", 78 "//third_party/googletest:gmock_main", 79 "//third_party/googletest:gtest_main", 80 "//utils/native/base:utils", 81 ] 82 83 include_dirs = [ 84 "include", 85 "//drivers/peripheral/wlan/interfaces/include", 86 "//drivers/peripheral/wlan/hdi_service/services", 87 "//drivers/peripheral/wlan/client/include", 88 "//drivers/peripheral/wlan/hal/include", 89 "//drivers/peripheral/wlan/hdi_service/include", 90 "$FWK_ROOT_DIR/core/shared/include", 91 "$FWK_ROOT_DIR/ability/sbuf/include", 92 "$FWK_ROOT_DIR/include", 93 "$FWK_ROOT_DIR/include/wifi", 94 "$FWK_ROOT_DIR/include/core", 95 "$FWK_ROOT_DIR/include/utils", 96 "//drivers/adapter/uhdf2/include/hdi", 97 "//drivers/adapter/uhdf2/shared/include", 98 "//drivers/adapter/uhdf2/include/host", 99 ] 100 101 if (is_standard_system) { 102 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 103 } else { 104 external_deps = [ "hilog:libhilog" ] 105 } 106} 107 108###########################end########################### 109group("unittest") { 110 testonly = true 111 deps = [ 112 ":WlanHdiServiceTest", 113 ":WlanHdiServiceTestC", 114 ] 115} 116