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