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