196279301Sopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 296279301Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 396279301Sopenharmony_ci# you may not use this file except in compliance with the License. 496279301Sopenharmony_ci# You may obtain a copy of the License at 596279301Sopenharmony_ci# 696279301Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 796279301Sopenharmony_ci# 896279301Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 996279301Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1096279301Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1196279301Sopenharmony_ci# See the License for the specific language governing permissions and 1296279301Sopenharmony_ci# limitations under the License. 1396279301Sopenharmony_ci 1496279301Sopenharmony_ciimport("//base/notification/distributed_notification_service/notification.gni") 1596279301Sopenharmony_ciimport("//build/ohos.gni") 1696279301Sopenharmony_ciimport("//build/test.gni") 1796279301Sopenharmony_ciimport("//foundation/ability/ability_runtime/ability_runtime.gni") 1896279301Sopenharmony_ci 1996279301Sopenharmony_cimodule_output_path = "${component_name}/moduletest" 2096279301Sopenharmony_ci 2196279301Sopenharmony_ciohos_moduletest("ans_module_test") { 2296279301Sopenharmony_ci module_out_path = module_output_path 2396279301Sopenharmony_ci include_dirs = [ 2496279301Sopenharmony_ci "include", 2596279301Sopenharmony_ci "${services_path}/ans/include", 2696279301Sopenharmony_ci "${services_path}/ans/test/unittest", 2796279301Sopenharmony_ci "${services_path}/ans/test/unittest/mock/include", 2896279301Sopenharmony_ci "${services_path}/test/moduletest/mock/include", 2996279301Sopenharmony_ci "${ffrt_path}/interfaces/kits", 3096279301Sopenharmony_ci ] 3196279301Sopenharmony_ci 3296279301Sopenharmony_ci sources = [ 3396279301Sopenharmony_ci "${services_path}/ans/test/unittest/mock/mock_ipc.cpp", 3496279301Sopenharmony_ci "${test_path}/mock/mock_tokenid_kit.cpp", 3596279301Sopenharmony_ci "ans_module_test.cpp", 3696279301Sopenharmony_ci "mock/blob.cpp", 3796279301Sopenharmony_ci "mock/distributed_kv_data_manager.cpp", 3896279301Sopenharmony_ci "mock/mock_accesstoken_kit.cpp", 3996279301Sopenharmony_ci "mock/mock_bundle_manager.cpp", 4096279301Sopenharmony_ci "mock/mock_bundle_manager_helper.cpp", 4196279301Sopenharmony_ci "mock/mock_event_handler.cpp", 4296279301Sopenharmony_ci "mock/mock_single_kv_store.cpp", 4396279301Sopenharmony_ci ] 4496279301Sopenharmony_ci 4596279301Sopenharmony_ci deps = [ 4696279301Sopenharmony_ci "${frameworks_module_ans_path}:ans_innerkits", 4796279301Sopenharmony_ci "${services_path}/ans:libans", 4896279301Sopenharmony_ci ] 4996279301Sopenharmony_ci 5096279301Sopenharmony_ci external_deps = [ 5196279301Sopenharmony_ci "ability_base:want", 5296279301Sopenharmony_ci "ability_base:zuri", 5396279301Sopenharmony_ci "ability_runtime:ability_manager", 5496279301Sopenharmony_ci "ability_runtime:abilitykit_native", 5596279301Sopenharmony_ci "ability_runtime:app_manager", 5696279301Sopenharmony_ci "ability_runtime:wantagent_innerkits", 5796279301Sopenharmony_ci "access_token:libaccesstoken_sdk", 5896279301Sopenharmony_ci "access_token:libtokenid_sdk", 5996279301Sopenharmony_ci "bundle_framework:appexecfwk_base", 6096279301Sopenharmony_ci "bundle_framework:appexecfwk_core", 6196279301Sopenharmony_ci "c_utils:utils", 6296279301Sopenharmony_ci "common_event_service:cesfwk_innerkits", 6396279301Sopenharmony_ci "eventhandler:libeventhandler", 6496279301Sopenharmony_ci "ffrt:libffrt", 6596279301Sopenharmony_ci "hilog:libhilog", 6696279301Sopenharmony_ci "hisysevent:libhisysevent", 6796279301Sopenharmony_ci "hitrace:hitrace_meter", 6896279301Sopenharmony_ci "hitrace:libhitracechain", 6996279301Sopenharmony_ci "image_framework:image_native", 7096279301Sopenharmony_ci "ipc:ipc_core", 7196279301Sopenharmony_ci "kv_store:distributeddata_inner", 7296279301Sopenharmony_ci "os_account:os_account_innerkits", 7396279301Sopenharmony_ci "relational_store:native_rdb", 7496279301Sopenharmony_ci "safwk:system_ability_fwk", 7596279301Sopenharmony_ci "samgr:samgr_proxy", 7696279301Sopenharmony_ci "time_service:time_client", 7796279301Sopenharmony_ci ] 7896279301Sopenharmony_ci 7996279301Sopenharmony_ci defines = [] 8096279301Sopenharmony_ci if (device_usage) { 8196279301Sopenharmony_ci external_deps += [ "device_usage_statistics:usagestatsinner" ] 8296279301Sopenharmony_ci defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 8396279301Sopenharmony_ci } 8496279301Sopenharmony_ci 8596279301Sopenharmony_ci if (player_framework) { 8696279301Sopenharmony_ci external_deps += [ "player_framework:media_client" ] 8796279301Sopenharmony_ci defines += [ "PLAYER_FRAMEWORK_ENABLE" ] 8896279301Sopenharmony_ci } 8996279301Sopenharmony_ci 9096279301Sopenharmony_ci if (distributed_notification_supported) { 9196279301Sopenharmony_ci defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 9296279301Sopenharmony_ci deps += [ "${services_path}/distributed:libans_distributed" ] 9396279301Sopenharmony_ci } 9496279301Sopenharmony_ci 9596279301Sopenharmony_ci subsystem_name = "${subsystem_name}" 9696279301Sopenharmony_ci part_name = "${component_name}" 9796279301Sopenharmony_ci} 9896279301Sopenharmony_ci 9996279301Sopenharmony_cigroup("moduletest") { 10096279301Sopenharmony_ci testonly = true 10196279301Sopenharmony_ci deps = [] 10296279301Sopenharmony_ci 10396279301Sopenharmony_ci deps += [ ":ans_module_test" ] 10496279301Sopenharmony_ci} 105