1cb7eb8c9Sopenharmony_ci# Copyright (C) 2023 Huawei Device Co., Ltd. 2cb7eb8c9Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3cb7eb8c9Sopenharmony_ci# you may not use this file except in compliance with the License. 4cb7eb8c9Sopenharmony_ci# You may obtain a copy of the License at 5cb7eb8c9Sopenharmony_ci# 6cb7eb8c9Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7cb7eb8c9Sopenharmony_ci# 8cb7eb8c9Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9cb7eb8c9Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10cb7eb8c9Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11cb7eb8c9Sopenharmony_ci# See the License for the specific language governing permissions and 12cb7eb8c9Sopenharmony_ci# limitations under the License. 13cb7eb8c9Sopenharmony_ci 14cb7eb8c9Sopenharmony_ciimport("//build/test.gni") 15cb7eb8c9Sopenharmony_ciimport("//foundation/filemanagement/dfs_service/distributedfile.gni") 16cb7eb8c9Sopenharmony_ci 17cb7eb8c9Sopenharmony_ciohos_unittest("dentry_meta_file_test") { 18cb7eb8c9Sopenharmony_ci module_out_path = "filemanagement/dfs_service" 19cb7eb8c9Sopenharmony_ci 20cb7eb8c9Sopenharmony_ci sources = [ 21cb7eb8c9Sopenharmony_ci "./mock/base_interface_lib_mock.cpp", 22cb7eb8c9Sopenharmony_ci "dentry_meta_file_test.cpp", 23cb7eb8c9Sopenharmony_ci ] 24cb7eb8c9Sopenharmony_ci 25cb7eb8c9Sopenharmony_ci include_dirs = [ 26cb7eb8c9Sopenharmony_ci "${distributedfile_path}/test/unittests/cloudsync_sa/dentry/mock/", 27cb7eb8c9Sopenharmony_ci "${utils_path}/dentry/include", 28cb7eb8c9Sopenharmony_ci ] 29cb7eb8c9Sopenharmony_ci 30cb7eb8c9Sopenharmony_ci deps = [ 31cb7eb8c9Sopenharmony_ci "${utils_path}:libdistributedfiledentry", 32cb7eb8c9Sopenharmony_ci "//third_party/googletest:gmock_main", 33cb7eb8c9Sopenharmony_ci "//third_party/googletest:gtest_main", 34cb7eb8c9Sopenharmony_ci ] 35cb7eb8c9Sopenharmony_ci 36cb7eb8c9Sopenharmony_ci external_deps = [ "c_utils:utils" ] 37cb7eb8c9Sopenharmony_ci 38cb7eb8c9Sopenharmony_ci defines = [ "private=public" ] 39cb7eb8c9Sopenharmony_ci defines += [ 40cb7eb8c9Sopenharmony_ci "LOG_DOMAIN=0xD004307", 41cb7eb8c9Sopenharmony_ci "LOG_TAG=\"CLOUDSYNC_SA\"", 42cb7eb8c9Sopenharmony_ci ] 43cb7eb8c9Sopenharmony_ci use_exceptions = true 44cb7eb8c9Sopenharmony_ci} 45cb7eb8c9Sopenharmony_ci 46cb7eb8c9Sopenharmony_ciohos_unittest("dentry_file_utils_test") { 47cb7eb8c9Sopenharmony_ci module_out_path = "filemanagement/dfs_service" 48cb7eb8c9Sopenharmony_ci 49cb7eb8c9Sopenharmony_ci sources = [ "dentry_file_utils_test.cpp" ] 50cb7eb8c9Sopenharmony_ci 51cb7eb8c9Sopenharmony_ci include_dirs = [ "${utils_path}/dentry/include" ] 52cb7eb8c9Sopenharmony_ci 53cb7eb8c9Sopenharmony_ci deps = [ 54cb7eb8c9Sopenharmony_ci "${utils_path}:libdistributedfiledentry", 55cb7eb8c9Sopenharmony_ci "//third_party/googletest:gmock_main", 56cb7eb8c9Sopenharmony_ci "//third_party/googletest:gtest_main", 57cb7eb8c9Sopenharmony_ci ] 58cb7eb8c9Sopenharmony_ci 59cb7eb8c9Sopenharmony_ci external_deps = [ "c_utils:utils" ] 60cb7eb8c9Sopenharmony_ci 61cb7eb8c9Sopenharmony_ci defines = [ "private=public" ] 62cb7eb8c9Sopenharmony_ci defines += [ 63cb7eb8c9Sopenharmony_ci "LOG_DOMAIN=0xD004307", 64cb7eb8c9Sopenharmony_ci "LOG_TAG=\"CLOUDSYNC_SA\"", 65cb7eb8c9Sopenharmony_ci ] 66cb7eb8c9Sopenharmony_ci use_exceptions = true 67cb7eb8c9Sopenharmony_ci} 68cb7eb8c9Sopenharmony_ci 69cb7eb8c9Sopenharmony_ciohos_unittest("dentry_meta_file_clouddisk_test") { 70cb7eb8c9Sopenharmony_ci branch_protector_ret = "pac_ret" 71cb7eb8c9Sopenharmony_ci sanitize = { 72cb7eb8c9Sopenharmony_ci integer_overflow = true 73cb7eb8c9Sopenharmony_ci cfi = true 74cb7eb8c9Sopenharmony_ci cfi_cross_dso = true 75cb7eb8c9Sopenharmony_ci debug = false 76cb7eb8c9Sopenharmony_ci } 77cb7eb8c9Sopenharmony_ci module_out_path = "filemanagement/dfs_service" 78cb7eb8c9Sopenharmony_ci 79cb7eb8c9Sopenharmony_ci sources = [ 80cb7eb8c9Sopenharmony_ci "./mock/base_interface_lib_mock.cpp", 81cb7eb8c9Sopenharmony_ci "dentry_meta_file_clouddisk_test.cpp", 82cb7eb8c9Sopenharmony_ci ] 83cb7eb8c9Sopenharmony_ci 84cb7eb8c9Sopenharmony_ci include_dirs = [ 85cb7eb8c9Sopenharmony_ci "${distributedfile_path}/test/unittests/cloudsync_sa/dentry/mock/", 86cb7eb8c9Sopenharmony_ci "${utils_path}/dentry/include", 87cb7eb8c9Sopenharmony_ci ] 88cb7eb8c9Sopenharmony_ci 89cb7eb8c9Sopenharmony_ci deps = [ 90cb7eb8c9Sopenharmony_ci "${utils_path}:libdistributedfiledentry", 91cb7eb8c9Sopenharmony_ci "${utils_path}:libdistributedfileutils", 92cb7eb8c9Sopenharmony_ci "//third_party/googletest:gmock_main", 93cb7eb8c9Sopenharmony_ci "//third_party/googletest:gtest_main", 94cb7eb8c9Sopenharmony_ci ] 95cb7eb8c9Sopenharmony_ci 96cb7eb8c9Sopenharmony_ci external_deps = [ "c_utils:utils" ] 97cb7eb8c9Sopenharmony_ci 98cb7eb8c9Sopenharmony_ci defines = [ "private=public" ] 99cb7eb8c9Sopenharmony_ci defines += [ 100cb7eb8c9Sopenharmony_ci "LOG_DOMAIN=0xD004307", 101cb7eb8c9Sopenharmony_ci "LOG_TAG=\"CLOUDSYNC_SA\"", 102cb7eb8c9Sopenharmony_ci ] 103cb7eb8c9Sopenharmony_ci use_exceptions = true 104cb7eb8c9Sopenharmony_ci} 105cb7eb8c9Sopenharmony_ci 106cb7eb8c9Sopenharmony_cigroup("cloudsync_sa_dentry_test") { 107cb7eb8c9Sopenharmony_ci testonly = true 108cb7eb8c9Sopenharmony_ci deps = [ 109cb7eb8c9Sopenharmony_ci ":dentry_file_utils_test", 110cb7eb8c9Sopenharmony_ci ":dentry_meta_file_clouddisk_test", 111cb7eb8c9Sopenharmony_ci ":dentry_meta_file_test", 112cb7eb8c9Sopenharmony_ci ] 113cb7eb8c9Sopenharmony_ci} 114