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/ndkimpl" 17 18############################################################################### 19config("module_private_config") { 20 include_dirs = [ 21 "${udmf_interfaces_path}/ndk/data", 22 "${udmf_interfaces_path}/innerkits/data", 23 "${udmf_interfaces_path}/innerkits/common", 24 "${udmf_framework_path}/common", 25 "${udmf_framework_path}/ndkimpl/data", 26 ] 27} 28 29common_deps = [ 30 "${udmf_interfaces_path}/innerkits:udmf_client", 31 "${udmf_interfaces_path}/innerkits:utd_client", 32 "${udmf_interfaces_path}/ndk:libudmf", 33] 34 35common_external_deps = [ 36 "ability_base:want", 37 "access_token:libaccesstoken_sdk", 38 "access_token:libnativetoken", 39 "access_token:libtoken_setproc", 40 "c_utils:utils", 41 "image_framework:image", 42 "image_framework:image_native", 43 "image_framework:pixelmap", 44 "samgr:samgr_proxy", 45] 46 47ohos_unittest("UtdTest") { 48 module_out_path = module_output_path 49 50 sources = [ "utd_test.cpp" ] 51 52 configs = [ ":module_private_config" ] 53 54 deps = common_deps 55 56 external_deps = common_external_deps 57} 58 59ohos_unittest("UdsTest") { 60 module_out_path = module_output_path 61 62 sources = [ "uds_test.cpp" ] 63 64 configs = [ ":module_private_config" ] 65 66 deps = common_deps 67 68 external_deps = common_external_deps 69} 70 71ohos_unittest("UdmfTest") { 72 module_out_path = module_output_path 73 74 sources = [ "udmf_test.cpp" ] 75 76 configs = [ ":module_private_config" ] 77 78 deps = common_deps 79 80 external_deps = common_external_deps 81} 82 83############################################################################### 84group("unittest") { 85 testonly = true 86 87 deps = [ 88 ":UdmfTest", 89 ":UdsTest", 90 ":UtdTest", 91 ] 92} 93############################################################################### 94