158ec469eSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 258ec469eSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 358ec469eSopenharmony_ci# you may not use this file except in compliance with the License. 458ec469eSopenharmony_ci# You may obtain a copy of the License at 558ec469eSopenharmony_ci# 658ec469eSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 758ec469eSopenharmony_ci# 858ec469eSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 958ec469eSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1058ec469eSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1158ec469eSopenharmony_ci# See the License for the specific language governing permissions and 1258ec469eSopenharmony_ci# limitations under the License. 1358ec469eSopenharmony_ci 1458ec469eSopenharmony_ciimport("//build/test.gni") 1558ec469eSopenharmony_ciimport("./../../../../miscdevice.gni") 1658ec469eSopenharmony_ci 1758ec469eSopenharmony_cimodule_output_path = "miscdevice/vibrator" 1858ec469eSopenharmony_ci 1958ec469eSopenharmony_ci############################################################################### 2058ec469eSopenharmony_ci 2158ec469eSopenharmony_ciohos_unittest("NativeVibratorTest") { 2258ec469eSopenharmony_ci module_out_path = module_output_path 2358ec469eSopenharmony_ci 2458ec469eSopenharmony_ci include_dirs = [ 2558ec469eSopenharmony_ci "$SUBSYSTEM_DIR/interfaces/inner_api/vibrator", 2658ec469eSopenharmony_ci "$SUBSYSTEM_DIR/interfaces/kits/c", 2758ec469eSopenharmony_ci "$SUBSYSTEM_DIR/utils/common/include", 2858ec469eSopenharmony_ci ] 2958ec469eSopenharmony_ci 3058ec469eSopenharmony_ci sources = [ "vibrator_test.cpp" ] 3158ec469eSopenharmony_ci 3258ec469eSopenharmony_ci external_deps = [ 3358ec469eSopenharmony_ci "access_token:libaccesstoken_sdk", 3458ec469eSopenharmony_ci "access_token:libnativetoken_shared", 3558ec469eSopenharmony_ci "access_token:libtokensetproc_shared", 3658ec469eSopenharmony_ci "googletest:gmock", 3758ec469eSopenharmony_ci "googletest:gtest_main", 3858ec469eSopenharmony_ci "hilog:libhilog", 3958ec469eSopenharmony_ci "init:libbegetutil", 4058ec469eSopenharmony_ci "ipc:ipc_single", 4158ec469eSopenharmony_ci ] 4258ec469eSopenharmony_ci 4358ec469eSopenharmony_ci deps = [ 4458ec469eSopenharmony_ci "$SUBSYSTEM_DIR/frameworks/capi:ohvibrator", 4558ec469eSopenharmony_ci "$SUBSYSTEM_DIR/frameworks/native/vibrator:vibrator_target", 4658ec469eSopenharmony_ci ] 4758ec469eSopenharmony_ci resource_config_file = 4858ec469eSopenharmony_ci "$SUBSYSTEM_DIR/test/unittest/vibrator/capi/resource/ohos_test.xml" 4958ec469eSopenharmony_ci} 5058ec469eSopenharmony_ci 5158ec469eSopenharmony_ci############################################################################### 5258ec469eSopenharmony_cigroup("unittest") { 5358ec469eSopenharmony_ci testonly = true 5458ec469eSopenharmony_ci deps = [ ":NativeVibratorTest" ] 5558ec469eSopenharmony_ci} 56