• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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("../screenlock.gni")
16
17module_output_path = "screenlock/screenlock_service"
18
19ohos_unittest("ScreenLockServiceTest") {
20  sanitize = {
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24  }
25  module_out_path = module_output_path
26  include_dirs = [
27    "unittest",
28    "${screenlock_mgr_path}/frameworks/native/include",
29    "${screenlock_mgr_path}/services/include",
30    "${screenlock_mgr_path}/utils/include",
31  ]
32
33  sources = [
34    "unittest/screenlock_callback_test.cpp",
35    "unittest/screenlock_client_test.cpp",
36    "unittest/screenlock_notify_test_instance.cpp",
37    "unittest/screenlock_service_test.cpp",
38  ]
39
40  external_deps = [
41    "ability_base:base",
42    "ability_base:want",
43    "ability_runtime:app_manager",
44    "access_token:libaccesstoken_sdk",
45    "access_token:libtoken_setproc",
46    "access_token:libtokenid_sdk",
47    "c_utils:utils",
48    "common_event_service:cesfwk_innerkits",
49    "eventhandler:libeventhandler",
50    "hilog:libhilog",
51    "hitrace:hitrace_meter",
52    "ipc:ipc_single",
53    "samgr:samgr_proxy",
54    "window_manager:libdm",
55  ]
56
57  deps = [
58    "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static",
59    "${screenlock_mgr_path}/services:screenlock_server_static",
60    "${screenlock_mgr_path}/utils:screenlock_utils",
61    "//third_party/googletest:gtest_main",
62  ]
63
64  defines = []
65}
66
67group("unittest") {
68  testonly = true
69
70  deps = []
71
72  deps += [ ":ScreenLockServiceTest" ]
73}
74