# Copyright (C) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("../screenlock.gni") module_output_path = "screenlock/screenlock_service" ohos_unittest("ScreenLockServiceTest") { sanitize = { cfi = true cfi_cross_dso = true debug = false } module_out_path = module_output_path include_dirs = [ "unittest", "${screenlock_mgr_path}/frameworks/native/include", "${screenlock_mgr_path}/services/include", "${screenlock_mgr_path}/utils/include", ] sources = [ "unittest/screenlock_callback_test.cpp", "unittest/screenlock_client_test.cpp", "unittest/screenlock_notify_test_instance.cpp", "unittest/screenlock_preferences_test.cpp", "unittest/screenlock_service_test.cpp", "unittest/screenlock_strongauth_test.cpp", ] external_deps = [ "ability_base:base", "ability_base:want", "ability_runtime:ability_manager", "ability_runtime:app_manager", "access_token:libaccesstoken_sdk", "access_token:libtoken_setproc", "access_token:libtokenid_sdk", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_single", "os_account:os_account_innerkits", "samgr:samgr_proxy", "time_service:time_client", "user_auth_framework:userauth_client", "window_manager:libdm", ] deps = [ "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static", "${screenlock_mgr_path}/services:screenlock_server_static", "${screenlock_mgr_path}/utils:screenlock_utils", "//third_party/googletest:gtest_main", ] defines = [] } group("unittest") { testonly = true deps = [] deps += [ ":ScreenLockServiceTest" ] }