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") 17import("//foundation/ability/ability_runtime/cj_environment/cj_environment.gni") 18 19ohos_unittest("cj_environment_other_test") { 20 module_out_path = "ability_runtime/ability_runtime/cj_environment_other_test" 21 include_dirs = [ 22 "${ability_runtime_test_path}/mock/common/include", 23 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app", 24 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", 25 "${ability_runtime_path}/interfaces/kits/native/ability/native", 26 "${ability_runtime_path}/interfaces/inner_api/runtime/include", 27 "${ability_runtime_path}/cj_environment/frameworks/cj_environment", 28 "${ability_runtime_path}/cj_environment/frameworks/cj_environment/src", 29 "${ability_runtime_path}/cj_environment/interfaces", 30 "${ability_runtime_path}/cj_environment/interfaces/inner_api", 31 "${ability_runtime_path}/cj_environment/frameworks/cj_environment/include", 32 "${ability_runtime_native_path}/runtime", 33 ] 34 35 sources = [ 36 "${ability_runtime_path}/cj_environment/frameworks/cj_environment/src/cj_environment.cpp", 37 "${ability_runtime_path}/cj_environment/frameworks/cj_environment/src/dynamic_loader_ohos.cpp", 38 "cj_environment_test.cpp", 39 ] 40 cflags = [] 41 if (target_cpu == "arm") { 42 cflags += [ "-DBINDER_IPC_32BIT" ] 43 } 44 deps = [ 45 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 46 "${ability_runtime_innerkits_path}/app_manager:app_manager", 47 "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", 48 "${ability_runtime_innerkits_path}/runtime:runtime", 49 "${ability_runtime_native_path}/ability/native:ability_thread", 50 "${ability_runtime_native_path}/ability/native:abilitykit_native", 51 "${ability_runtime_native_path}/ability/native:uiabilitykit_native", 52 "${ability_runtime_native_path}/appkit:app_context", 53 "${ability_runtime_native_path}/appkit:appkit_manager_helper", 54 "${ability_runtime_native_path}/appkit:appkit_native", 55 ] 56 57 external_deps = [ 58 "ability_base:base", 59 "ability_base:configuration", 60 "ability_base:want", 61 "ability_runtime:runtime", 62 "bounds_checking_function:libsec_shared", 63 "bundle_framework:appexecfwk_base", 64 "bundle_framework:appexecfwk_base", 65 "bundle_framework:appexecfwk_core", 66 "bundle_framework:appexecfwk_core", 67 "c_utils:utils", 68 "common_event_service:cesfwk_innerkits", 69 "eventhandler:libeventhandler", 70 "ffrt:libffrt", 71 "googletest:gmock_main", 72 "googletest:gtest_main", 73 "hilog:libhilog", 74 "hitrace:hitrace_meter", 75 "init:libbegetutil", 76 "ipc:ipc_core", 77 "napi:ace_napi", 78 "resource_management:global_resmgr", 79 "resource_management:librawfile", 80 "samgr:samgr_proxy", 81 ] 82 83 if (ability_runtime_graphics) { 84 external_deps += [ "window_manager:libwm" ] 85 } 86 87 defines = [ "CONFIG_HILOG" ] 88} 89 90group("unittest") { 91 testonly = true 92 deps = [ ":cj_environment_other_test" ] 93} 94