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/inner_api/vibrator",
26    "$SUBSYSTEM_DIR/interfaces/kits/c",
27    "$SUBSYSTEM_DIR/utils/common/include",
28  ]
29
30  sources = [ "vibrator_test.cpp" ]
31
32  external_deps = [
33    "access_token:libaccesstoken_sdk",
34    "access_token:libnativetoken_shared",
35    "access_token:libtokensetproc_shared",
36    "googletest:gmock",
37    "googletest:gtest_main",
38    "hilog:libhilog",
39    "init:libbegetutil",
40    "ipc:ipc_single",
41  ]
42
43  deps = [
44    "$SUBSYSTEM_DIR/frameworks/capi:ohvibrator",
45    "$SUBSYSTEM_DIR/frameworks/native/vibrator:vibrator_target",
46  ]
47  resource_config_file =
48      "$SUBSYSTEM_DIR/test/unittest/vibrator/capi/resource/ohos_test.xml"
49}
50
51###############################################################################
52group("unittest") {
53  testonly = true
54  deps = [ ":NativeVibratorTest" ]
55}
56