1# Copyright (c) 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/test.gni") 15import("./../../../../miscdevice.gni") 16 17module_output_path = "miscdevice/vibrator" 18 19############################################################################### 20 21ohos_unittest("NativeVibratorTest") { 22 module_out_path = module_output_path 23 24 include_dirs = [ 25 "$SUBSYSTEM_DIR/interfaces/kits/c", 26 "$SUBSYSTEM_DIR/utils/common/include", 27 ] 28 29 sources = [ "vibrator_test.cpp" ] 30 31 external_deps = [ 32 "access_token:libaccesstoken_sdk", 33 "access_token:libnativetoken", 34 "access_token:libtoken_setproc", 35 "hilog:libhilog", 36 "init:libbegetutil", 37 "ipc:ipc_single", 38 ] 39 40 deps = [ 41 "$SUBSYSTEM_DIR/frameworks/capi:ohvibrator", 42 "//third_party/googletest:gmock_main", 43 "//third_party/googletest:gtest_main", 44 "//third_party/googletest:gtest_main", 45 ] 46 resource_config_file = 47 "$SUBSYSTEM_DIR/test/unittest/vibrator/capi/resource/ohos_test.xml" 48} 49 50############################################################################### 51group("unittest") { 52 testonly = true 53 deps = [ ":NativeVibratorTest" ] 54} 55