# Copyright (C) 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/test.gni") import("//foundation/filemanagement/dfs_service/distributedfile.gni") ohos_unittest("cloud_daemon_manager_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_manager_impl.cpp", "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_service_proxy.cpp", "../../mock/cloud_daemon_manager_mock.cpp", "cloud_daemon_manager_test.cpp", ] include_dirs = [ "${distributedfile_path}/utils/log/include", "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/include", "${distributedfile_path}/interfaces/inner_api/native/cloud_daemon_kit_inner", ] deps = [ "${services_path}/distributedfiledaemon:libdistributedfiledaemon", "${utils_path}:libdistributedfileutils", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] defines = [ "private=public", "LOG_DOMAIN=0xD004308", "LOG_TAG=\"CLOUD_DAEMON_API\"", ] use_exceptions = true } ohos_unittest("cloud_daemon_manager_impl_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_manager_impl.cpp", "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_service_proxy.cpp", "cloud_daemon_manager_impl_test.cpp", ] include_dirs = [ "${distributedfile_path}/utils/log/include", "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/include", "${distributedfile_path}/interfaces/inner_api/native/cloud_daemon_kit_inner", ] deps = [ "${services_path}/distributedfiledaemon:libdistributedfiledaemon", "${utils_path}:libdistributedfileutils", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] defines = [ "private=public", "LOG_DOMAIN=0xD004308", "LOG_TAG=\"CLOUD_DAEMON_API\"", ] use_exceptions = true } ohos_unittest("cloud_daemon_service_proxy_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_service_proxy.cpp", "cloud_daemon_service_proxy_test.cpp", ] include_dirs = [ "${distributedfile_path}/utils/log/include", "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/include", "${distributedfile_path}/interfaces/inner_api/native/cloud_daemon_kit_inner", "${distributedfile_path}/test/unittests/cloud_daemon/include", "../../../../../systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", "../../../../../communication/ipc/interfaces/innerkits/ipc_core/include", ] deps = [ "${utils_path}:libdistributedfileutils", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", ] defines = [ "private=public", "LOG_DOMAIN=0xD004308", "LOG_TAG=\"CLOUD_DAEMON_API\"", ] use_exceptions = true } group("cloud_daemon_test") { testonly = true deps = [ ":cloud_daemon_manager_impl_test", ":cloud_daemon_manager_test", ":cloud_daemon_service_proxy_test", ] }