• 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")
15
16module_output_path = "screenlock/screenlock_service"
17
18ohos_unittest("ScreenLockServiceTest") {
19  module_out_path = module_output_path
20  include_dirs = [
21    "unittest",
22    "//base/theme/screenlock_mgr/frameworks/kitsimpl/include",
23    "//base/theme/screenlock_mgr/services/include",
24    "//commonlibrary/c_utils/base/include",
25    "//utils/system/safwk/native/include",
26    "//base/telephony/core_service/utils/log/include",
27    "//base/telephony/core_service/interfaces/innerkits/include",
28    "//base/user_idm/interfaces/innerkits/include",
29    "//third_party/json/include",
30    "//base/theme/screenlock_mgr/utils/include",
31  ]
32
33  sources = [
34    "//base/theme/screenlock_mgr/services/src/command.cpp",
35    "//base/theme/screenlock_mgr/services/src/dump_helper.cpp",
36    "//base/theme/screenlock_mgr/services/src/screenlock_get_info_callback.cpp",
37    "//base/theme/screenlock_mgr/services/src/screenlock_manager_stub.cpp",
38    "//base/theme/screenlock_mgr/services/src/screenlock_system_ability.cpp",
39    "//base/theme/screenlock_mgr/services/src/screenlock_system_ability_proxy.cpp",
40    "unittest/screenlock_callback_test.cpp",
41    "unittest/screenlock_client_test.cpp",
42    "unittest/screenlock_notify_test_instance.cpp",
43    "unittest/screenlock_service_test.cpp",
44  ]
45
46  external_deps = [
47    "ability_base:base",
48    "ability_base:want",
49    "ability_runtime:ability_manager",
50    "ability_runtime:app_manager",
51    "c_utils:utils",
52    "eventhandler:libeventhandler",
53    "hitrace_native:hitrace_meter",
54    "hiviewdfx_hilog_native:libhilog",
55    "init:libbegetutil",
56    "ipc:ipc_core",
57    "multimedia_image_framework:image_native",
58    "os_account:os_account_innerkits",
59    "safwk:system_ability_fwk",
60    "user_auth_framework:userauth_client",
61    "window_manager:libdm",
62  ]
63
64  deps = [
65    "//base/theme/screenlock_mgr/frameworks/kitsimpl:screenlock_client",
66    "//base/theme/screenlock_mgr/utils:screenlock_utils",
67    "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk",
68    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
69    "//third_party/googletest:gtest_main",
70  ]
71
72  defines = []
73  defines += [ "OHOS_TEST_FLAG" ]
74
75  configs = [ "//commonlibrary/c_utils/base:utils_config" ]
76}
77
78group("unittest") {
79  testonly = true
80
81  deps = []
82
83  deps += [ ":ScreenLockServiceTest" ]
84}
85