1# Copyright (c) 2021 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/appexecfwk/standard/appexecfwk.gni") 16 17module_output_path = "appexecfwk_standard/bundlemgrservice" 18 19config("bundlemgr_parse_test_config") { 20 include_dirs = [ 21 "${services_path}/bundlemgr/include", 22 "${services_path}/bundlemgr/test/mock/include", 23 ] 24} 25 26ohos_unittest("BmsBundleParserTest") { 27 module_out_path = module_output_path 28 29 sources = [ 30 "${services_path}/bundlemgr/src/inner_bundle_info.cpp", 31 "bms_bundle_parser_test.cpp", 32 ] 33 34 configs = [ 35 "${services_path}/bundlemgr/test:bundlemgr_test_config", 36 ":bundlemgr_parse_test_config", 37 ] 38 cflags = [] 39 if (target_cpu == "arm") { 40 cflags += [ "-DBINDER_IPC_32BIT" ] 41 } 42 deps = [ 43 "${common_path}:libappexecfwk_common", 44 "${services_path}/bundlemgr:bundle_parser", 45 "${services_path}/bundlemgr:parser_common", 46 "//third_party/googletest:gtest_main", 47 ] 48 49 external_deps = [ 50 "hiviewdfx_hilog_native:libhilog", 51 "ipc:ipc_core", 52 ] 53} 54 55group("unittest") { 56 testonly = true 57 deps = [ ":BmsBundleParserTest" ] 58} 59