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_want_ffi_test") { 19 module_out_path = "ability_runtime/ability_runtime/cj_want_ffi_test" 20 include_dirs = [ "${ability_runtime_path}/frameworks/cj/ffi" ] 21 22 sources = [ 23 "${ability_runtime_path}/frameworks/cj/ffi/cj_want_ffi.cpp", 24 "cj_want_ffi_test.cpp", 25 ] 26 27 cflags = [] 28 if (target_cpu == "arm") { 29 cflags += [ "-DBINDER_IPC_32BIT" ] 30 } 31 deps = [ 32 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 33 "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting", 34 "${ability_runtime_innerkits_path}/ability_manager:mission_info", 35 "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", 36 "${ability_runtime_native_path}/ability:ability_context_native", 37 "${ability_runtime_native_path}/ability/native:ability_thread", 38 "${ability_runtime_native_path}/ability/native:abilitykit_native", 39 "${ability_runtime_native_path}/ability/native:uiabilitykit_native", 40 "${ability_runtime_native_path}/appkit:app_context", 41 "${ability_runtime_native_path}/appkit:appkit_manager_helper", 42 "${ability_runtime_native_path}/appkit:appkit_native", 43 "${ability_runtime_path}/frameworks/cj/ffi:cj_ability_ffi", 44 "${ability_runtime_path}/utils/global/freeze:freeze_util", 45 ] 46 47 external_deps = [ 48 "ability_base:base", 49 "ability_base:configuration", 50 "ability_base:session_info", 51 "ability_base:want", 52 "ability_runtime:ability_context_native", 53 "ability_runtime:runtime", 54 "ability_runtime:wantagent_innerkits", 55 "bundle_framework:appexecfwk_base", 56 "bundle_framework:appexecfwk_core", 57 "c_utils:utils", 58 "common_event_service:cesfwk_innerkits", 59 "eventhandler:libeventhandler", 60 "ffrt:libffrt", 61 "googletest:gmock_main", 62 "googletest:gtest_main", 63 "hilog:libhilog", 64 "hitrace:hitrace_meter", 65 "init:libbegetutil", 66 "ipc:ipc_core", 67 "napi:ace_napi", 68 "napi:cj_bind_native", 69 "resource_management:global_resmgr", 70 "samgr:samgr_proxy", 71 "window_manager:libwsutils", 72 "window_manager:scene_session", 73 ] 74} 75 76group("unittest") { 77 testonly = true 78 deps = [ ":cj_want_ffi_test" ] 79} 80