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. 13 14import("//build/ohos.gni") 15import("//build/test.gni") 16import("//foundation/ability/ability_runtime/ability_runtime.gni") 17 18ohos_unittest("cj_ability_object_test") { 19 module_out_path = "ability_runtime/cj_ability_object_test" 20 include_dirs = [ 21 "${ability_runtime_path}/interfaces/kits/native/ability/native/ability_runtime/", 22 "${ability_runtime_path}/interfaces/kits/native/ability/native", 23 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime", 24 "${ability_base_kits_path}/configuration/include", 25 "${ability_runtime_path}/cj_environment/interfaces/inner_api", 26 ] 27 28 sources = [ "cj_ability_object_test.cpp" ] 29 30 configs = [ "${c_utils_base_path}:utils_config" ] 31 cflags = [] 32 if (target_cpu == "arm") { 33 cflags += [ "-DBINDER_IPC_32BIT" ] 34 } 35 deps = [ 36 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 37 "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting", 38 "${ability_runtime_innerkits_path}/runtime:runtime", 39 "${ability_runtime_native_path}/ability:ability_context_native", 40 "${ability_runtime_native_path}/ability/native:abilitykit_native", 41 "${ability_runtime_native_path}/ability/native:continuation_ipc", 42 "${ability_runtime_native_path}/ability/native:insight_intent_executor", 43 "${ability_runtime_native_path}/ability/native:uiabilitykit_native", 44 "${ability_runtime_native_path}/appkit:app_context", 45 "${ability_runtime_native_path}/appkit:appkit_delegator", 46 "${ability_runtime_native_path}/insight_intent/insight_intent_context:insightintentcontext", 47 "${ability_runtime_path}/utils/global/freeze:freeze_util", 48 "${ability_runtime_services_path}/common:event_report", 49 "//third_party/googletest:gmock_main", 50 "//third_party/googletest:gtest_main", 51 ] 52 53 external_deps = [ 54 "ability_base:base", 55 "ability_base:configuration", 56 "ability_base:want", 57 "bundle_framework:appexecfwk_base", 58 "c_utils:utils", 59 "common_event_service:cesfwk_innerkits", 60 "ets_runtime:libark_jsruntime", 61 "eventhandler:libeventhandler", 62 "hilog:libhilog", 63 "hitrace:hitrace_meter", 64 "init:libbegetutil", 65 "ipc:ipc_core", 66 "ipc:ipc_napi", 67 "napi:ace_napi", 68 "napi:cj_bind_native", 69 "resource_management:global_resmgr", 70 "window_manager:cj_window_ffi", 71 "window_manager:libwm", 72 "window_manager:libwsutils", 73 "window_manager:windowstage_kit", 74 ] 75 76 defines = [ "CONFIG_HILOG" ] 77} 78 79group("unittest") { 80 testonly = true 81 deps = [ ":cj_ability_object_test" ] 82} 83