1# Copyright (c) 2021-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 14base_root = "../../../../../../" 15import("//build/ohos_var.gni") 16import("//test/xts/tools/build/suite.gni") 17import("$base_root/drivers/hdf_core/adapter/uhdf2/uhdf.gni") 18 19module_output_path = "hats/wlan" 20ohos_moduletest_suite("HatsHdfWifiHdiTest") { 21 module_out_path = module_output_path 22 23 configs = [ ":hdf_wlan_hdicommon" ] 24 25 sources = [ "./hal/wifi_hal_test.cpp" ] 26 resource_config_file = "$base_root/drivers/hdf_core/adapter/uhdf2/test/resource/wlan/ohos_test.xml" 27 cflags = [ 28 "-Wall", 29 "-Wextra", 30 "-Werror", 31 "-fsigned-char", 32 "-fno-common", 33 "-fno-strict-aliasing", 34 ] 35 deps = [] 36 if (is_standard_system) { 37 external_deps = [ 38 "$base_root/drivers/hdf_core/adapter/build/test_common:libhdf_test_common", 39 "$base_root/drivers/peripheral/wlan/client:wifi_driver_client", 40 "$base_root/drivers/peripheral/wlan/hal:wifi_hal", 41 "c_utils:utils", 42 "hdf_core:libhdf_utils", 43 "hilog:libhilog", 44 ] 45 } else { 46 external_deps = [ "hilog:libhilog" ] 47 } 48 49 subsystem_name = "xts" 50 part_name = "hats" 51} 52 53config("hdf_wlan_hdicommon") { 54 include_dirs = [ 55 "$base_root/drivers/peripheral/wlan/client/include", 56 "$base_root/drivers/peripheral/wlan/hal/include", 57 "$base_root/drivers/peripheral/wlan/interfaces/include", 58 ] 59} 60 61module_output_path = "hats/wlan" 62ohos_moduletest_suite("HatsHdfWifiHdistartandstopTest") { 63 module_out_path = module_output_path 64 configs = [ ":hdf_wlan_hdicommonsecond" ] 65 66 sources = [ "./hal/wifi_hal_startandstop.cpp" ] 67 resource_config_file = "$base_root/drivers/hdf_core/adapter/uhdf2/test/resource/wlan/ohos_test.xml" 68 cflags = [ 69 "-Wall", 70 "-Wextra", 71 "-Werror", 72 "-fsigned-char", 73 "-fno-common", 74 "-fno-strict-aliasing", 75 ] 76 deps = [] 77 if (is_standard_system) { 78 external_deps = [ 79 "$base_root/drivers/hdf_core/adapter/build/test_common:libhdf_test_common", 80 "$base_root/drivers/peripheral/wlan/client:wifi_driver_client", 81 "$base_root/drivers/peripheral/wlan/hal:wifi_hal", 82 "c_utils:utils", 83 "hdf_core:libhdf_utils", 84 "hilog:libhilog", 85 ] 86 } else { 87 external_deps = [ "hilog:libhilog" ] 88 } 89 90 subsystem_name = "xts" 91 part_name = "hats" 92} 93 94config("hdf_wlan_hdicommonsecond") { 95 include_dirs = [ 96 "$base_root/drivers/peripheral/wlan/client/include", 97 "$base_root/drivers/peripheral/wlan/hal/include", 98 "$base_root/drivers/peripheral/wlan/interfaces/include", 99 ] 100} 101 102module_output_path = "hats/wlan" 103ohos_moduletest_suite("HatsHdfWificlientTest") { 104 module_out_path = module_output_path 105 configs = [ ":hdf_wlan_hdicommonthird" ] 106 107 sources = [ "./client/hdf_client_test.cpp" ] 108 resource_config_file = "$base_root/drivers/hdf_core/adapter/uhdf2/test/resource/wlan/ohos_test.xml" 109 cflags = [ 110 "-Wall", 111 "-Wextra", 112 "-Werror", 113 "-fsigned-char", 114 "-fno-common", 115 "-fno-strict-aliasing", 116 ] 117 deps = [] 118 if (is_standard_system) { 119 external_deps = [ 120 "$base_root/drivers/hdf_core/adapter/build/test_common:libhdf_test_common", 121 "$base_root/drivers/peripheral/wlan/client:wifi_driver_client", 122 "$base_root/drivers/peripheral/wlan/hal:wifi_hal", 123 "c_utils:utils", 124 "hdf_core:libhdf_utils", 125 "hilog:libhilog", 126 ] 127 } else { 128 external_deps = [ "hilog:libhilog" ] 129 } 130 131 subsystem_name = "xts" 132 part_name = "hats" 133} 134 135config("hdf_wlan_hdicommonthird") { 136 include_dirs = [ 137 "$base_root/drivers/peripheral/wlan/client/include", 138 "$base_root/drivers/peripheral/wlan/hal/include", 139 "$base_root/drivers/peripheral/wlan/interfaces/include", 140 ] 141} 142module_output_path = "hats/wlan" 143ohos_moduletest_suite("HatsHdfWificommonTest") { 144 module_out_path = module_output_path 145 146 configs = [ ":hdf_wlan_hdicommonfour" ] 147 sources = [ 148 "./common/hdf_flow_control_test.cpp", 149 "./common/hdf_message_test.cpp", 150 "./common/hdf_module_test.cpp", 151 "./common/hdf_net_buff_test.cpp", 152 "./common/hdf_net_device_test.cpp", 153 ] 154 resource_config_file = "$base_root/drivers/hdf_core/adapter/uhdf2/test/resource/wlan/ohos_test.xml" 155 cflags = [ 156 "-Wall", 157 "-Wextra", 158 "-Werror", 159 "-fsigned-char", 160 "-fno-common", 161 "-fno-strict-aliasing", 162 ] 163 deps = [] 164 if (is_standard_system) { 165 external_deps = [ 166 "$base_root/drivers/hdf_core/adapter/build/test_common:libhdf_test_common", 167 "$base_root/drivers/peripheral/wlan/client:wifi_driver_client", 168 "$base_root/drivers/peripheral/wlan/hal:wifi_hal", 169 "c_utils:utils", 170 "hdf_core:libhdf_utils", 171 "hilog:libhilog", 172 ] 173 } else { 174 external_deps = [ "hilog:libhilog" ] 175 } 176 177 subsystem_name = "xts" 178 part_name = "hats" 179} 180 181config("hdf_wlan_hdicommonfour") { 182 include_dirs = [ 183 "$base_root/drivers/peripheral/wlan/client/include", 184 "$base_root/drivers/peripheral/wlan/hal/include", 185 "$base_root/drivers/peripheral/wlan/interfaces/include", 186 ] 187} 188