# Copyright (c) 2021-2023 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("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") module_output_path = "${component_name}/moduletest" ohos_moduletest("ans_module_test") { module_out_path = module_output_path include_dirs = [ "include", "${services_path}/ans/include", "${services_path}/ans/test/unittest", "${services_path}/ans/test/unittest/mock/include", "${services_path}/test/moduletest/mock/include", "${ffrt_path}/interfaces/kits", ] sources = [ "${services_path}/ans/test/unittest/mock/mock_ipc.cpp", "${test_path}/mock/mock_tokenid_kit.cpp", "ans_module_test.cpp", "mock/blob.cpp", "mock/distributed_kv_data_manager.cpp", "mock/mock_accesstoken_kit.cpp", "mock/mock_bundle_manager.cpp", "mock/mock_bundle_manager_helper.cpp", "mock/mock_event_handler.cpp", "mock/mock_single_kv_store.cpp", ] deps = [ "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", ] external_deps = [ "ability_base:want", "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:app_manager", "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "hitrace:libhitracechain", "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", "os_account:os_account_innerkits", "player_framework:media_client", "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", "time_service:time_client", ] defines = [] if (device_usage) { external_deps += [ "device_usage_statistics:usagestatsinner" ] defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] } if (distributed_notification_supported) { defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] deps += [ "${services_path}/distributed:libans_distributed" ] } subsystem_name = "${subsystem_name}" part_name = "${component_name}" } group("moduletest") { testonly = true deps = [] deps += [ ":ans_module_test" ] }