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 "ability_base:zuri", 35 "access_token:libaccesstoken_sdk", 36 "access_token:libnativetoken", 37 "access_token:libtoken_setproc", 38 "bundle_framework:appexecfwk_core", 39 "c_utils:utils", 40 "hilog:libhilog", 41 "image_framework:image", 42 "image_framework:image", 43 "image_framework:image_native", 44 "image_framework:pixelmap", 45 "ipc:ipc_core", 46] 47 48ohos_unittest("UtdCfgsCheckerTest") { 49 module_out_path = module_output_path 50 51 sources = [ 52 "${udmf_framework_path}/common/graph.cpp", 53 "${udmf_framework_path}/common/utd_cfgs_checker.cpp", 54 "${udmf_framework_path}/common/utd_graph.cpp", 55 "utd_cfgs_checker_test.cpp", 56 ] 57 58 configs = [ ":module_private_config" ] 59 60 deps = common_deps 61 62 external_deps = common_external_deps 63} 64 65ohos_unittest("TlvUtilTest") { 66 module_out_path = module_output_path 67 68 sources = [ 69 "${udmf_framework_path}/innerkitsimpl/convert/udmf_conversion.cpp", 70 "tlv_util_test.cpp", 71 ] 72 73 configs = [ ":module_private_config" ] 74 75 deps = common_deps 76 77 external_deps = [ 78 "ability_base:want", 79 "c_utils:utils", 80 "hilog:libhilog", 81 "image_framework:image", 82 "image_framework:image_native", 83 "image_framework:pixelmap", 84 ] 85 86 defines = [ 87 "private=public", 88 "protected=public", 89 ] 90} 91 92############################################################################### 93group("unittest") { 94 testonly = true 95 96 deps = [ 97 ":TlvUtilTest", 98 ":UtdCfgsCheckerTest", 99 ] 100} 101############################################################################### 102