1# Copyright (c) 2024 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/app_file_service/backup.gni") 16 17ohos_unittest("b_incremental_session_test") { 18 module_out_path = path_module_out_tests 19 20 include_dirs = [ 21 "${path_backup}/frameworks/native/backup_kit_inner/include", 22 "${path_backup}/interfaces/inner_api/native/backup_kit_inner/impl", 23 ] 24 25 sources = [ 26 "${path_backup}/frameworks/native/backup_kit_inner/src/b_file_info.cpp", 27 "${path_backup}/frameworks/native/backup_kit_inner/src/b_incremental_backup_session.cpp", 28 "${path_backup}/frameworks/native/backup_kit_inner/src/b_incremental_data.cpp", 29 "${path_backup}/frameworks/native/backup_kit_inner/src/b_incremental_restore_session.cpp", 30 "${path_backup}/frameworks/native/backup_kit_inner/src/b_incremental_session_restore_async.cpp", 31 "${path_backup}/frameworks/native/backup_kit_inner/src/service_incremental_reverse.cpp", 32 "${path_backup}/frameworks/native/backup_kit_inner/src/service_reverse.cpp", 33 "${path_backup}/frameworks/native/backup_kit_inner/src/service_reverse_stub.cpp", 34 "b_incremental_session_test.cpp", 35 "service_proxy_mock.cpp", 36 ] 37 38 deps = [ 39 "${path_backup}/utils:backup_utils", 40 "//third_party/googletest:gmock_main", 41 "//third_party/googletest:gtest_main", 42 ] 43 44 defines = [ 45 "LOG_TAG=\"app_file_service\"", 46 "LOG_DOMAIN=0xD200000", 47 "private = public", 48 "protected = public", 49 ] 50 51 external_deps = [ 52 "c_utils:utils", 53 "hilog:libhilog", 54 "hitrace:hitrace_meter", 55 "ipc:ipc_core", 56 "safwk:system_ability_fwk", 57 "samgr:samgr_proxy", 58 ] 59 60 use_exceptions = true 61} 62 63group("session_test") { 64 testonly = true 65 deps = [ ":b_incremental_session_test" ] 66} 67