xref: /base/theme/screenlock_mgr/test/BUILD.gn (revision 365d9939)
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_preferences_test.cpp",
38    "unittest/screenlock_service_test.cpp",
39    "unittest/screenlock_strongauth_test.cpp",
40  ]
41
42  external_deps = [
43    "ability_base:base",
44    "ability_base:want",
45    "ability_runtime:ability_manager",
46    "ability_runtime:app_manager",
47    "access_token:libaccesstoken_sdk",
48    "access_token:libtoken_setproc",
49    "access_token:libtokenid_sdk",
50    "c_utils:utils",
51    "common_event_service:cesfwk_innerkits",
52    "eventhandler:libeventhandler",
53    "ffrt:libffrt",
54    "hilog:libhilog",
55    "hitrace:hitrace_meter",
56    "ipc:ipc_single",
57    "os_account:os_account_innerkits",
58    "samgr:samgr_proxy",
59    "time_service:time_client",
60    "user_auth_framework:userauth_client",
61    "window_manager:libdm",
62  ]
63
64  deps = [
65    "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static",
66    "${screenlock_mgr_path}/services:screenlock_server_static",
67    "${screenlock_mgr_path}/utils:screenlock_utils",
68    "//third_party/googletest:gtest_main",
69  ]
70
71  defines = []
72}
73
74group("unittest") {
75  testonly = true
76
77  deps = []
78
79  deps += [ ":ScreenLockServiceTest" ]
80}
81