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") 15 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 "${kv_store_include_path}/include", 34 "${kv_store_include_path}/interfaces/include/", 35 "${kv_store_include_path}/interfaces/include/relational", 36 "//foundation/distributeddatamgr/kv_store/frameworks/common", 37 ] 38} 39 40ohos_unittest("NativeObjectStoreTest") { 41 module_out_path = module_output_path 42 43 sources = [ 44 "mock/src/mock_soft_bus.cpp", 45 "src/app_pipe_mgr_test.cpp", 46 "src/communicator_test.cpp", 47 "src/object_store_test.cpp", 48 "src/process_communicator_impl_test.cpp", 49 ] 50 51 configs = [ ":module_private_config" ] 52 53 external_deps = [ 54 "access_token:libaccesstoken_sdk", 55 "access_token:libnativetoken", 56 "access_token:libtoken_setproc", 57 "hilog:libhilog", 58 ] 59 60 deps = [ 61 "//foundation/distributeddatamgr/data_object/interfaces/innerkits:distributeddataobject_static", 62 "//third_party/googletest:gmock", 63 "//third_party/googletest:gtest_main", 64 ] 65} 66 67group("unittest") { 68 testonly = true 69 deps = [ ":NativeObjectStoreTest" ] 70} 71