# 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") ROOT_DIR = "//foundation/filemanagement/storage_service/services" ohos_unittest("external_volume_info_test") { module_out_path = "filemanagement/storage_service/storage_daemon" defines = [ "STORAGE_LOG_TAG = \"StorageDaemon\"" ] include_dirs = [ "$ROOT_DIR/storage_daemon/include", "$ROOT_DIR/common/include", "$ROOT_DIR/storage_manager/include", ] sources = [ "$ROOT_DIR/storage_daemon/volume/src/external_volume_info.cpp", "$ROOT_DIR/storage_daemon/volume/src/process.cpp", "$ROOT_DIR/storage_daemon/volume/src/volume_info.cpp", "$ROOT_DIR/storage_daemon/volume/test/external_volume_info_test.cpp", ] deps = [ "//foundation/filemanagement/storage_service/services/storage_daemon:storage_common_utils", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", "ipc:ipc_core", ] } ohos_unittest("process_test") { module_out_path = "filemanagement/storage_service/storage_daemon" defines = [ "STORAGE_LOG_TAG = \"StorageDaemon\"" ] include_dirs = [ "$ROOT_DIR/storage_daemon/include", "$ROOT_DIR/storage_daemon/include/volume", "$ROOT_DIR/common/include", ] sources = [ "$ROOT_DIR/storage_daemon/volume/src/external_volume_info.cpp", "$ROOT_DIR/storage_daemon/volume/src/process.cpp", "$ROOT_DIR/storage_daemon/volume/src/volume_info.cpp", "$ROOT_DIR/storage_daemon/volume/test/process_test.cpp", ] deps = [ "//foundation/filemanagement/storage_service/services/storage_daemon:storage_common_utils", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", "ipc:ipc_core", ] } ohos_unittest("volume_info_test") { module_out_path = "filemanagement/storage_service/storage_daemon" defines = [ "STORAGE_LOG_TAG = \"StorageDaemon\"" ] include_dirs = [ "$ROOT_DIR/storage_daemon/include", "$ROOT_DIR/storage_daemon/utils/test/common", "$ROOT_DIR/common/include", "$ROOT_DIR/storage_manager/include", ] sources = [ "$ROOT_DIR/storage_daemon/utils/test/common/help_utils.cpp", "$ROOT_DIR/storage_daemon/volume/src/volume_info.cpp", "$ROOT_DIR/storage_daemon/volume/test/volume_info_test.cpp", ] deps = [ "//foundation/filemanagement/storage_service/services/storage_daemon:storage_common_utils", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", "ipc:ipc_core", ] } ohos_unittest("volume_manager_test") { module_out_path = "filemanagement/storage_service/storage_daemon" defines = [ "STORAGE_LOG_TAG = \"StorageDaemon\"" ] include_dirs = [ "$ROOT_DIR/storage_daemon/include", "$ROOT_DIR/storage_daemon/include/volume", "$ROOT_DIR/common/include", "$ROOT_DIR/storage_manager/include", "//foundation/filemanagement/storage_service/interfaces/innerkits/storage_manager/native", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", ] sources = [ "$ROOT_DIR/storage_daemon/ipc/src/storage_manager_client.cpp", "$ROOT_DIR/storage_daemon/volume/src/external_volume_info.cpp", "$ROOT_DIR/storage_daemon/volume/src/process.cpp", "$ROOT_DIR/storage_daemon/volume/src/volume_info.cpp", "$ROOT_DIR/storage_daemon/volume/src/volume_manager.cpp", "$ROOT_DIR/storage_daemon/volume/test/volume_manager_test.cpp", "$ROOT_DIR/storage_manager/innerkits_impl/src/volume_core.cpp", ] deps = [ "//foundation/filemanagement/storage_service/services/storage_daemon:storage_common_utils", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] } group("storage_daemon_volume_test") { testonly = true deps = [ ":external_volume_info_test", ":process_test", ":volume_info_test", ":volume_manager_test", ] }