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 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_vibrator_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_vibrator_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_vibrator", 47 "//third_party/bounds_checking_function:libsec_shared", 48 ] 49 external_deps = [ "hilog_lite:hilog_shared" ] 50 } 51} else { 52 module_output_path = "hdf/vibrator" 53 ohos_unittest("hdf_peripheral_test_vibrator_performance") { 54 module_out_path = module_output_path 55 include_dirs = [] 56 57 sources = [ "common/hdf_vibrator_performance_test.cpp" ] 58 cflags = [ 59 "-Wall", 60 "-Wextra", 61 "-Werror", 62 "-fsigned-char", 63 "-fno-common", 64 "-fno-strict-aliasing", 65 ] 66 deps = [ "../../hal:hdi_vibrator" ] 67 if (is_standard_system) { 68 external_deps = [ 69 "c_utils:utils", 70 "hdf_core:libhdf_utils", 71 "hilog:libhilog", 72 ] 73 } else { 74 external_deps = [ "hilog:libhilog" ] 75 } 76 } 77} 78