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. 13import("//build/test.gni") 14import("//foundation/distributeddatamgr/udmf/udmf.gni") 15 16module_output_path = "udmf/common" 17 18############################################################################### 19config("module_private_config") { 20 include_dirs = [ 21 "${udmf_interfaces_path}/innerkits/common", 22 "${udmf_interfaces_path}/innerkits/convert", 23 "${udmf_framework_path}/innerkitsimpl/data", 24 "${udmf_framework_path}/common", 25 "${kv_store_path}/frameworks/common", 26 "${udmf_interfaces_path}/innerkits/data", 27 ] 28} 29 30common_deps = [ "${udmf_interfaces_path}/innerkits:udmf_client" ] 31 32common_external_deps = [ 33 "ability_base:want", 34 "c_utils:utils", 35 "hilog:libhilog", 36 "image_framework:image", 37 "image_framework:image", 38 "image_framework:image_native", 39 "image_framework:pixelmap", 40 "ipc:ipc_core", 41] 42 43ohos_unittest("UtdCfgsCheckerTest") { 44 module_out_path = module_output_path 45 46 sources = [ 47 "${udmf_framework_path}/common/graph.cpp", 48 "${udmf_framework_path}/common/utd_cfgs_checker.cpp", 49 "${udmf_framework_path}/common/utd_graph.cpp", 50 "utd_cfgs_checker_test.cpp", 51 ] 52 53 configs = [ ":module_private_config" ] 54 55 deps = common_deps 56 57 external_deps = common_external_deps 58} 59 60ohos_unittest("TlvUtilTest") { 61 module_out_path = module_output_path 62 63 sources = [ "tlv_util_test.cpp" ] 64 65 configs = [ ":module_private_config" ] 66 67 deps = common_deps 68 69 external_deps = [ 70 "ability_base:want", 71 "c_utils:utils", 72 "hilog:libhilog", 73 "image_framework:image", 74 "image_framework:image_native", 75 "image_framework:pixelmap", 76 ] 77 78 defines = [ 79 "private=public", 80 "protected=public", 81 ] 82} 83 84############################################################################### 85group("unittest") { 86 testonly = true 87 88 deps = [ 89 ":TlvUtilTest", 90 ":UtdCfgsCheckerTest", 91 ] 92} 93############################################################################### 94