# 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("//build/ohos.gni") import("//build/ohos_var.gni") import("//build/test.gni") import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni") module_output_path = "device_info_manager/deviceprofiletest" device_profile_configs = [ "${device_profile_service}/core:device_info_manager_config", "${device_profile_test}/resource:coverage_flags", ] device_profile_deps = [ "${device_profile_innerkits}/core:distributed_device_profile_client", "${device_profile_service}/core:distributed_device_profile", "//third_party/googletest:gtest_main", ] device_profile_external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", "device_auth:deviceauth_sdk", "device_manager:devicemanagersdk", "dsoftbus:softbus_client", "eventhandler:libeventhandler", "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", "kv_store:distributeddata_inner", "safwk:system_ability_fwk", "syscap_codec:syscap_interface_shared", ] ohos_unittest("profile_crud_test") { module_out_path = module_output_path sources = [ "unittest/profile_crud_test.cpp", "unittest/test_util.cpp", ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_dm_test") { module_out_path = module_output_path sources = [ "unittest/profile_dm_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_storage_test") { module_out_path = module_output_path sources = [ "unittest/profile_storage_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_sync_test") { module_out_path = module_output_path sources = [ "unittest/profile_sync_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("event_subscribe_test") { module_out_path = module_output_path sources = [ "unittest/event_subscribe_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_authority_test") { module_out_path = module_output_path sources = [ "unittest/profile_authority_test.cpp", "unittest/test_util.cpp", ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("content_sensor_test") { module_out_path = module_output_path sources = [ "unittest/content_sensor_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_change_notification_test") { module_out_path = module_output_path sources = [ "unittest/profile_change_notification_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_entry_test") { module_out_path = module_output_path sources = [ "unittest/profile_entry_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_proxy_test") { module_out_path = module_output_path sources = [ "unittest/profile_proxy_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("service_profile_test") { module_out_path = module_output_path sources = [ "unittest/service_profile_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("subscribe_info_test") { module_out_path = module_output_path sources = [ "unittest/subscribe_info_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("subscribe_manager_test") { module_out_path = module_output_path sources = [ "unittest/subscribe_manager_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_change_handler_test") { module_out_path = module_output_path sources = [ "unittest/profile_change_handler_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("subscribe_info_checker_test") { module_out_path = module_output_path sources = [ "unittest/subscribe_info_checker_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("device_profile_dfx_test") { module_out_path = module_output_path sources = [ "unittest/device_profile_dfx_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("device_profile_utils_test") { module_out_path = module_output_path sources = [ "unittest/device_profile_utils_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } ohos_unittest("profile_event_notifier_proxy_test") { module_out_path = module_output_path sources = [ "unittest/profile_event_notifier_proxy_test.cpp" ] configs = device_profile_configs deps = device_profile_deps external_deps = device_profile_external_deps part_name = "device_info_manager" subsystem_name = "deviceprofile" } group("unittest") { testonly = true deps = [ ":content_sensor_test", ":device_profile_dfx_test", ":device_profile_utils_test", ":event_subscribe_test", ":profile_authority_test", ":profile_change_handler_test", ":profile_change_notification_test", ":profile_crud_test", ":profile_dm_test", ":profile_entry_test", ":profile_event_notifier_proxy_test", ":profile_proxy_test", ":profile_storage_test", ":profile_sync_test", ":service_profile_test", ":subscribe_info_checker_test", ":subscribe_info_test", ":subscribe_manager_test", ] }