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