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