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_utils_ffi_test") { 19 module_out_path = "ability_runtime/cj_utils_ffi_test" 20 include_dirs = [ 21 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_delegator", 22 "${ability_runtime_path}/interfaces/kits/native/appkit/app", 23 "${bundlefwk_path}/interfaces/inner_api/appexecfwk_base/include", 24 "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", 25 "${common_event_service_path}/interfaces/inner_api", 26 "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", 27 "${ability_base_path}/interfaces/kits/native/session_info/include", 28 "${arkui_path}/ace_engine", 29 "${ability_runtime_path}/interfaces/kits/native/ability/native", 30 "${ability_runtime_path}/frameworks/cj/ffi", 31 "${ace_engine_path}/frameworks", 32 "${ability_runtime_path}/cj_environment/interfaces/inner_api", 33 ] 34 35 sources = [ 36 "${ability_runtime_path}/frameworks/cj/ffi/cj_utils_ffi.cpp", 37 "cj_utils_ffi_test.cpp", 38 ] 39 40 configs = [ "${c_utils_base_path}:utils_config" ] 41 cflags = [] 42 if (target_cpu == "arm") { 43 cflags += [ "-DBINDER_IPC_32BIT" ] 44 } 45 deps = [ 46 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 47 "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting", 48 "${ability_runtime_innerkits_path}/ability_manager:mission_info", 49 "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", 50 "${ability_runtime_native_path}/ability:ability_context_native", 51 "${ability_runtime_native_path}/ability/native:ability_thread", 52 "${ability_runtime_native_path}/ability/native:abilitykit_native", 53 "${ability_runtime_native_path}/ability/native:uiabilitykit_native", 54 "${ability_runtime_native_path}/appkit:app_context", 55 "${ability_runtime_native_path}/appkit:appkit_manager_helper", 56 "${ability_runtime_native_path}/appkit:appkit_native", 57 "${ability_runtime_path}/frameworks/cj/ffi:cj_ability_ffi", 58 "${ability_runtime_path}/utils/global/freeze:freeze_util", 59 "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 60 "${global_path}/resource_management/frameworks/resmgr:global_resmgr", 61 "//third_party/googletest:gmock_main", 62 "//third_party/googletest:gtest_main", 63 ] 64 65 external_deps = [ 66 "ability_base:base", 67 "ability_base:configuration", 68 "ability_base:session_info", 69 "ability_base:want", 70 "ability_runtime:ability_context_native", 71 "ability_runtime:runtime", 72 "ability_runtime:wantagent_innerkits", 73 "bundle_framework:appexecfwk_base", 74 "bundle_framework:appexecfwk_core", 75 "c_utils:utils", 76 "common_event_service:cesfwk_innerkits", 77 "eventhandler:libeventhandler", 78 "ffrt:libffrt", 79 "hilog:libhilog", 80 "hitrace:hitrace_meter", 81 "init:libbegetutil", 82 "ipc:ipc_core", 83 "napi:ace_napi", 84 "napi:cj_bind_native", 85 "window_manager:libwsutils", 86 "window_manager:scene_session", 87 ] 88} 89 90group("unittest") { 91 testonly = true 92 deps = [ ":cj_utils_ffi_test" ] 93} 94