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] 35 36common_external_deps = [ 37 "access_token:libaccesstoken_sdk", 38 "access_token:libnativetoken_shared", 39 "access_token:libtoken_setproc", 40 "c_utils:utils", 41 "cJSON:cjson", 42 "device_manager:devicemanagersdk", 43 "googletest:gtest", 44 "hilog:libhilog", 45 "hisysevent:libhisysevent", 46 "hitrace:hitrace_meter", 47 "hitrace:libhitracechain", 48 "huks:libhukssdk", 49 "ipc:ipc_single", 50 "samgr:samgr_proxy", 51] 52 53############################################################################### 54ohos_distributedtest("DistributedTest") { 55 module_out_path = module_output_path 56 57 cflags = [ "-Wno-c99-designator" ] 58 59 sources = [ "distributed_test.cpp" ] 60 61 configs = [ ":module_private_config" ] 62 63 external_deps = common_external_deps 64 65 deps = common_deps 66} 67 68ohos_distributedtest("DistributedTestAgent") { 69 module_out_path = module_output_path 70 71 cflags = [ "-Wno-c99-designator" ] 72 73 sources = [ "distributed_test_agent.cpp" ] 74 75 configs = [ ":module_private_config" ] 76 77 external_deps = common_external_deps 78 79 deps = common_deps 80} 81 82############################################################################### 83group("distributedtest") { 84 testonly = true 85 86 deps = [ 87 ":DistributedTest", 88 ":DistributedTestAgent", 89 ] 90} 91############################################################################### 92