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