# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/test.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") import("//foundation/ability/ability_runtime/cj_environment/cj_environment.gni") ohos_unittest("cj_environment_other_test") { module_out_path = "ability_runtime/cj_environment_other_test" include_dirs = [ "${ability_runtime_test_path}/mock/common/include", "${resource_management_path}/frameworks/resmgr/include", "${ability_base_kits_path}/configuration/include", "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app", "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", "${ability_runtime_path}/interfaces/kits/native/ability/native", "${ability_runtime_path}/interfaces/inner_api/runtime/include", "${ability_runtime_path}/cj_environment/frameworks/cj_environment", "${ability_runtime_path}/cj_environment/frameworks/cj_environment/src", "${ability_runtime_path}/cj_environment/interfaces", "${ability_runtime_path}/cj_environment/interfaces/inner_api", "${ability_runtime_path}/cj_environment/frameworks/cj_environment/include", "${ability_runtime_native_path}/runtime", ] sources = [ "${ability_runtime_path}/cj_environment/frameworks/cj_environment/src/cj_environment.cpp", "${ability_runtime_path}/cj_environment/frameworks/cj_environment/src/dynamic_loader_ohos.cpp", "cj_environment_test.cpp", ] configs = [ "${c_utils_base_path}:utils_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", "${ability_runtime_innerkits_path}/runtime:runtime", "${ability_runtime_native_path}/ability/native:ability_thread", "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_native_path}/ability/native:uiabilitykit_native", "${ability_runtime_native_path}/appkit:app_context", "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_native_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:base", "ability_base:configuration", "ability_base:want", "ability_runtime:runtime", "bounds_checking_function:libsec_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", "resource_management:global_resmgr", ] if (ability_runtime_graphics) { external_deps += [ "window_manager:libwm" ] } defines = [ "CONFIG_HILOG" ] } group("unittest") { testonly = true deps = [ ":cj_environment_other_test" ] }