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