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 14import("//build/lite/config/test.gni") 15 16hdf_core_path = "./../../../../.." 17 18unittest("hdf_adapter_uhdf_test_manager") { 19 output_extension = "bin" 20 output_dir = "$root_out_dir/test/unittest/hdf" 21 include_dirs = [ 22 "//third_party/googletest/googletest/include", 23 "//third_party/bounds_checking_function/include", 24 "$hdf_core_path/framework/include/platform", 25 "$hdf_core_path/framework/include/core", 26 "$hdf_core_path/framework/core/common/include/host", 27 "$hdf_core_path/framework/core/shared/include", 28 "$hdf_core_path/framework/include/osal", 29 "$hdf_core_path/adapter/uhdf/posix/include", 30 "$hdf_core_path/framework/include/utils", 31 "$hdf_core_path/framework/include", 32 "$hdf_core_path/framework/test/unittest/include", 33 "$hdf_core_path/framework/test/unittest/manager", 34 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 35 ] 36 37 defines = [ "__USER__" ] 38 sources = [ "$hdf_core_path/framework/core/manager/test/unittest/common/hdf_lite_manager_test.cpp" ] 39 deps = [ 40 "$hdf_core_path/adapter/build/test_common:libhdf_test_common", 41 "$hdf_core_path/adapter/uhdf/manager:hdf_core", 42 "$hdf_core_path/adapter/uhdf/posix:hdf_posix_osal", 43 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 44 ] 45 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 46} 47 48unittest("hdf_adapter_uhdf_test_ioservice") { 49 output_extension = "bin" 50 output_dir = "$root_out_dir/test/unittest/hdf" 51 include_dirs = [ 52 "//third_party/googletest/googletest/include", 53 "//third_party/bounds_checking_function/include", 54 "$hdf_core_path/framework/include/platform", 55 "$hdf_core_path/framework/include/core", 56 "$hdf_core_path/framework/core/common/include/host", 57 "$hdf_core_path/framework/core/shared/include", 58 "$hdf_core_path/framework/include/osal", 59 "$hdf_core_path/adapter/uhdf/posix/include", 60 "$hdf_core_path/framework/include/utils", 61 "$hdf_core_path/framework/include", 62 "$hdf_core_path/framework/test/unittest/include", 63 "$hdf_core_path/framework/test/unittest/manager", 64 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 65 ] 66 67 defines = [ "__USER__" ] 68 sources = [ "$hdf_core_path/framework/core/manager/test/unittest/common/hdf_ioservice_test.cpp" ] 69 deps = [ 70 "$hdf_core_path/adapter/build/test_common:libhdf_test_common", 71 "$hdf_core_path/adapter/uhdf/manager:hdf_core", 72 "$hdf_core_path/adapter/uhdf/posix:hdf_posix_osal", 73 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 74 ] 75 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 76} 77 78unittest("hdf_adapter_uhdf_test_sbuf") { 79 output_extension = "bin" 80 output_dir = "$root_out_dir/test/unittest/hdf" 81 include_dirs = [ 82 "//third_party/googletest/googletest/include", 83 "//third_party/bounds_checking_function/include", 84 "$hdf_core_path/framework/include/osal", 85 "$hdf_core_path/adapter/uhdf/posix/include", 86 "$hdf_core_path/framework/include/utils", 87 "$hdf_core_path/framework/include", 88 "$hdf_core_path/framework/test/unittest/include", 89 "$hdf_core_path/framework/test/unittest/manager", 90 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 91 ] 92 93 defines = [ 94 "__USER__", 95 "__LITEOS__", 96 ] 97 sources = [ "$hdf_core_path/framework/core/manager/test/unittest/common/hdf_sbuf_test.cpp" ] 98 deps = [ 99 "$hdf_core_path/adapter/build/test_common:libhdf_test_common", 100 "$hdf_core_path/adapter/uhdf/manager:hdf_core", 101 "$hdf_core_path/adapter/uhdf/posix:hdf_posix_osal", 102 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 103 ] 104 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 105} 106 107unittest("hdf_adapter_uhdf_test_door") { 108 output_extension = "bin" 109 output_dir = "$root_out_dir/test/unittest/hdf" 110 include_dirs = [ 111 "//third_party/googletest/googletest/include", 112 "//third_party/bounds_checking_function/include", 113 "$hdf_core_path/framework/include/platform", 114 "$hdf_core_path/framework/include/core", 115 "$hdf_core_path/framework/core/common/include/host", 116 "$hdf_core_path/framework/core/shared/include", 117 "$hdf_core_path/framework/include/osal", 118 "$hdf_core_path/adapter/uhdf/posix/include", 119 "$hdf_core_path/framework/include/utils", 120 "$hdf_core_path/framework/include", 121 "$hdf_core_path/framework/test/unittest/include", 122 "$hdf_core_path/framework/test/unittest/manager", 123 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 124 ] 125 126 defines = [ 127 "__USER__", 128 "__LITEOS__", 129 ] 130 sources = [ 131 "$hdf_core_path/framework/core/manager/test/unittest/common/hdf_ioservice_test.cpp", 132 "$hdf_core_path/framework/core/manager/test/unittest/common/hdf_lite_manager_test.cpp", 133 "$hdf_core_path/framework/core/manager/test/unittest/common/hdf_sbuf_test.cpp", 134 ] 135 deps = [ 136 "$hdf_core_path/adapter/build/test_common:libhdf_test_common", 137 "$hdf_core_path/adapter/uhdf/manager:hdf_core", 138 "$hdf_core_path/adapter/uhdf/posix:hdf_posix_osal", 139 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 140 ] 141 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 142} 143 144unittest("hdf_adapter_uhdf_test_pm") { 145 output_extension = "bin" 146 output_dir = "$root_out_dir/test/unittest/hdf" 147 include_dirs = [ 148 "//third_party/googletest/googletest/include", 149 "//third_party/bounds_checking_function/include", 150 "$hdf_core_path/framework/include/platform", 151 "$hdf_core_path/framework/include/core", 152 "$hdf_core_path/framework/core/common/include/host", 153 "$hdf_core_path/framework/core/shared/include", 154 "$hdf_core_path/framework/include/osal", 155 "$hdf_core_path/adapter/uhdf/posix/include", 156 "$hdf_core_path/framework/include/utils", 157 "$hdf_core_path/framework/include", 158 "$hdf_core_path/framework/test/unittest/include", 159 "$hdf_core_path/framework/test/unittest/manager", 160 "$hdf_core_path/framework/test/unittest/pm", 161 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 162 ] 163 164 defines = [ "__USER__" ] 165 sources = [ "$hdf_core_path/framework/core/manager/test/unittest/common/hdf_pm_test.cpp" ] 166 deps = [ 167 "$hdf_core_path/adapter/build/test_common:libhdf_test_common", 168 "$hdf_core_path/adapter/uhdf/manager:hdf_core", 169 "$hdf_core_path/adapter/uhdf/posix:hdf_posix_osal", 170 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 171 ] 172 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 173} 174