• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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_context_test") {
19  module_out_path = "ability_runtime/ability_runtime/cj_context_test"
20  include_dirs = [ "${ability_runtime_path}/frameworks/cj/ffi" ]
21
22  sources = [
23    "${ability_runtime_path}/frameworks/cj/ffi/context/cj_context.cpp",
24    "cj_context_test.cpp",
25  ]
26
27  cflags = []
28  if (target_cpu == "arm") {
29    cflags += [ "-DBINDER_IPC_32BIT" ]
30  }
31
32  deps = [
33    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
34    "${ability_runtime_native_path}/ability:ability_context_native",
35    "${ability_runtime_native_path}/appkit:app_context",
36    "${ability_runtime_native_path}/appkit:app_context_utils",
37    "${ability_runtime_path}/frameworks/cj/ffi:cj_ability_ffi",
38    "${ability_runtime_path}/frameworks/cj/ffi/context:cj_context_ffi",
39  ]
40
41  external_deps = [
42    "bundle_framework:appexecfwk_base",
43    "bundle_framework:cj_bundle_manager_ffi",
44    "c_utils:utils",
45    "eventhandler:libeventhandler",
46    "hilog:libhilog",
47    "ipc:ipc_core",
48    "ipc:ipc_napi",
49    "napi:ace_napi",
50    "napi:cj_bind_ffi",
51    "napi:cj_bind_native",
52  ]
53}
54
55group("unittest") {
56  testonly = true
57  deps = [ ":cj_context_test" ]
58}
59