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 "samgr:samgr_proxy", 61 "user_auth_framework:userauth_client", 62 "window_manager:libdm", 63 "bundle_framework:appexecfwk_core", 64 ] 65 66 deps = [ 67 "//base/theme/screenlock_mgr/frameworks/kitsimpl:screenlock_client", 68 "//base/theme/screenlock_mgr/utils:screenlock_utils", 69 "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk", 70 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 71 "//third_party/googletest:gtest_main", 72 ] 73 74 defines = [] 75 defines += [ "OHOS_TEST_FLAG" ] 76 77 configs = [ "//commonlibrary/c_utils/base:utils_config" ] 78} 79 80group("unittest") { 81 testonly = true 82 83 deps = [] 84 85 deps += [ ":ScreenLockServiceTest" ] 86} 87