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/kv_store/kv_store.gni") 16 17module_output_path = "kv_store/distributed_test" 18 19############################################################################### 20config("module_private_config") { 21 include_dirs = [ 22 "${kv_store_base_path}/test/distributedtest/single_kvstore_client", 23 "${kv_store_base_path}/interfaces/innerkits/distributeddata/include", 24 "${kv_store_base_path}/frameworks/common", 25 "${kv_store_base_path}/frameworks/distributeddatafwk/include", 26 "${kv_store_base_path}/frameworks/distributeddatafwk/src", 27 "${kv_store_base_path}/frameworks/kvdb/include", 28 ] 29} 30 31common_deps = [ 32 "${kv_store_base_path}/frameworks/libs/distributeddb:distributeddb", 33 "${kv_store_base_path}/interfaces/innerkits/distributeddata:distributeddata_inner", 34 "${third_party_path}/googletest:gtest", 35] 36 37common_external_deps = [ 38 "access_token:libaccesstoken_sdk", 39 "access_token:libnativetoken", 40 "access_token:libtoken_setproc", 41 "c_utils:utils", 42 "device_manager:devicemanagersdk", 43 "hilog:libhilog", 44 "hisysevent:libhisysevent", 45 "hitrace:hitrace_meter", 46 "hitrace:libhitracechain", 47 "huks:libhukssdk", 48 "ipc:ipc_single", 49 "samgr:samgr_proxy", 50] 51 52############################################################################### 53ohos_distributedtest("DistributedTest") { 54 module_out_path = module_output_path 55 56 cflags = [ "-Wno-c99-designator" ] 57 58 sources = [ "distributed_test.cpp" ] 59 60 configs = [ ":module_private_config" ] 61 62 external_deps = common_external_deps 63 64 deps = common_deps 65} 66 67ohos_distributedtest("DistributedTestAgent") { 68 module_out_path = module_output_path 69 70 cflags = [ "-Wno-c99-designator" ] 71 72 sources = [ "distributed_test_agent.cpp" ] 73 74 configs = [ ":module_private_config" ] 75 76 external_deps = common_external_deps 77 78 deps = common_deps 79} 80 81############################################################################### 82group("distributedtest") { 83 testonly = true 84 85 deps = [ 86 ":DistributedTest", 87 ":DistributedTestAgent", 88 ] 89} 90############################################################################### 91