1# Copyright (c) 2024 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 14HDF_CORE_PATH = "../../../../hdf_core" 15if (defined(ohos_lite)) { 16 import("//build/lite/config/component/lite_component.gni") 17 import("//build/lite/config/test.gni") 18} else { 19 import("//build/ohos.gni") 20 import("//build/test.gni") 21 import("$HDF_CORE_PATH/adapter/uhdf2/uhdf.gni") 22} 23 24if (defined(ohos_lite)) { 25 unittest("hdf_peripheral_test_light_performance") { 26 output_extension = "bin" 27 output_dir = "$root_out_dir/test/unittest/hdf" 28 include_dirs = [ 29 "//third_party/bounds_checking_function/include", 30 "../../interfaces/include", 31 ] 32 33 sources = [ "./common/hdf_light_performance_test.cpp" ] 34 cflags = [ 35 "-Wall", 36 "-Wextra", 37 "-Werror", 38 "-fsigned-char", 39 "-fno-common", 40 "-fno-strict-aliasing", 41 ] 42 public_deps = [ 43 "$HDF_CORE_PATH/adapter/build/test_common:libhdf_test_common", 44 "$HDF_CORE_PATH/adapter/uhdf/manager:hdf_core", 45 "$HDF_CORE_PATH/adapter/uhdf/posix:hdf_posix_osal", 46 "../../hal:hdi_light", 47 "//third_party/bounds_checking_function:libsec_shared", 48 ] 49 external_deps = [ 50 "drivers_interface_light:liblight_proxy_1.0", 51 "hilog_lite:hilog_shared", 52 ] 53 } 54} else { 55 module_output_path = "hdf/light" 56 ohos_unittest("hdf_peripheral_test_light_performance") { 57 module_out_path = module_output_path 58 include_dirs = [] 59 60 sources = [ "common/hdf_light_performance_test.cpp" ] 61 cflags = [ 62 "-Wall", 63 "-Wextra", 64 "-Werror", 65 "-fsigned-char", 66 "-fno-common", 67 "-fno-strict-aliasing", 68 ] 69 deps = [ "../../hal:hdi_light" ] 70 if (is_standard_system) { 71 external_deps = [ 72 "c_utils:utils", 73 "drivers_interface_light:liblight_proxy_1.0", 74 "hdf_core:libhdf_utils", 75 "hilog:libhilog", 76 ] 77 } else { 78 external_deps = [ "hilog:libhilog" ] 79 } 80 } 81} 82