1# Copyright (c) 2025 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/datamgr_service/datamgr_service.gni") 15 16module_output_path = "datamgr_service/datamgr_service/distributeddatafwk" 17 18############################################################################### 19config("module_private_config") { 20 visibility = [ ":*" ] 21 include_dirs = [ 22 "../extension", 23 "../ylong_cloud_extension/include", 24 ] 25 26 cflags = [ "-Werror" ] 27 defines = [ 28 "TEST_ON_DEVICE", 29 "OPENSSL_SUPPRESS_DEPRECATED", 30 ] 31} 32 33ohos_unittest("ExtensionUtilTest") { 34 module_out_path = module_output_path 35 sources = [ 36 "../extension/extension_util.cpp", 37 "unittest/extension_util_test.cpp" 38 ] 39 40 configs = [ ":module_private_config" ] 41 42 deps = [ 43 "${data_service_path}/rust/extension:opencloudextension", 44 "${data_service_path}/framework:distributeddatasvcfwk", 45 "${data_service_path}/rust/ylong_cloud_extension:ylong_cloud_extension", 46 ] 47 external_deps = [ 48 "hilog:libhilog", 49 "json:nlohmann_json_static", 50 "kv_store:datamgr_common", 51 ] 52 53 part_name = "datamgr_service" 54} 55 56############################################################################### 57 58group("unittest") { 59 testonly = true 60 deps = [] 61 62 deps += [ 63 ":ExtensionUtilTest", 64 ] 65} 66