1# Copyright (c) 2022 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/distributeddatamgr/data_object/data_object.gni") 16module_output_path = "data_object/impl" 17 18data_object_base_path = "//foundation/distributeddatamgr/data_object" 19 20data_object_innerkits_path = "${data_object_base_path}/frameworks/innerkitsimpl" 21 22kv_store_include_path = 23 "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb" 24 25config("module_private_config") { 26 visibility = [ ":*" ] 27 28 include_dirs = [ 29 "./mock/include", 30 "${data_object_innerkits_path}/include/adaptor", 31 "${data_object_innerkits_path}/include/common", 32 "${data_object_innerkits_path}/include/communicator", 33 "${data_object_innerkits_path}/include", 34 "${kv_store_include_path}/include", 35 "${kv_store_include_path}/interfaces/include/", 36 "${kv_store_include_path}/interfaces/include/relational", 37 "//foundation/distributeddatamgr/kv_store/frameworks/common", 38 "${relational_store_path}/interfaces/inner_api/common_type/include", 39 ] 40} 41 42ohos_unittest("NativeObjectStoreTest") { 43 module_out_path = module_output_path 44 45 sources = [ 46 "mock/src/mock_soft_bus.cpp", 47 "src/app_pipe_mgr_test.cpp", 48 "src/communicator_test.cpp", 49 "src/object_store_test.cpp", 50 "src/process_communicator_impl_test.cpp", 51 ] 52 53 configs = [ ":module_private_config" ] 54 55 external_deps = [ 56 "access_token:libaccesstoken_sdk", 57 "access_token:libnativetoken", 58 "access_token:libtoken_setproc", 59 "hilog:libhilog", 60 ] 61 62 deps = [ 63 "//foundation/distributeddatamgr/data_object/interfaces/innerkits:distributeddataobject_static", 64 "//third_party/googletest:gmock", 65 "//third_party/googletest:gtest_main", 66 ] 67} 68 69group("unittest") { 70 testonly = true 71 deps = [ ":NativeObjectStoreTest" ] 72} 73