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 14if (defined(ohos_lite)) { 15 import("//build/lite/config/test.gni") 16} else { 17 import("//build/test.gni") 18 import("//drivers/adapter/uhdf2/uhdf.gni") 19} 20 21if (defined(ohos_lite)) { 22 unittest("hdf_peripheral_wlan_test_performance") { 23 output_extension = "bin" 24 output_dir = "$root_out_dir/test/unittest/hdf" 25 include_dirs = [ 26 "//third_party/googletest/googletest/include", 27 "//third_party/bounds_checking_function/include", 28 "//drivers/framework/include/platform", 29 "//drivers/framework/include/core", 30 "//drivers/framework/include/osal", 31 "//drivers/adapter/uhdf/posix/include", 32 "//drivers/framework/include/utils", 33 "//drivers/framework/include", 34 "//drivers/peripheral/wlan/client/include", 35 "//drivers/peripheral/wlan/hal/include", 36 "//drivers/peripheral/wlan/interfaces/include", 37 "//drivers/framework/test/unittest/include", 38 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 39 ] 40 41 sources = [ "//drivers/peripheral/wlan/test/performance/common/hdf_wlan_performance_test.cpp" ] 42 deps = [ 43 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 44 "//drivers/adapter/build/test_common:libhdf_test_common", 45 "//drivers/adapter/uhdf/manager:hdf_core", 46 "//drivers/adapter/uhdf/platform:hdf_platform", 47 "//drivers/adapter/uhdf/posix:hdf_posix_osal", 48 "//drivers/peripheral/wlan/client:wifi_driver_client", 49 "//drivers/peripheral/wlan/hal:wifi_hal", 50 ] 51 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 52 cflags = [ 53 "-Wall", 54 "-Wextra", 55 "-Werror", 56 "-fsigned-char", 57 "-fno-common", 58 "-fno-strict-aliasing", 59 ] 60 } 61} else { 62 module_output_path = "hdf/wlan" 63 ohos_unittest("hdf_peripheral_wlan_test_performance") { 64 module_out_path = module_output_path 65 include_dirs = [ 66 "//drivers/peripheral/wlan/client/include", 67 "//drivers/peripheral/wlan/hal/include", 68 "//drivers/peripheral/wlan/interfaces/include", 69 ] 70 sources = [ "./common/hdf_wlan_performance_test.cpp" ] 71 cflags = [ 72 "-Wall", 73 "-Wextra", 74 "-Werror", 75 "-fsigned-char", 76 "-fno-common", 77 "-fno-strict-aliasing", 78 ] 79 deps = [ 80 "//drivers/peripheral/wlan/client:wifi_driver_client", 81 "//drivers/peripheral/wlan/hal:wifi_hal", 82 ] 83 if (is_standard_system) { 84 external_deps = [ 85 "device_driver_framework:libhdf_test_common", 86 "device_driver_framework:libhdf_utils", 87 "hiviewdfx_hilog_native:libhilog", 88 "utils_base:utils", 89 ] 90 } else { 91 external_deps = [ "hilog:libhilog" ] 92 } 93 } 94} 95