• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//foundation/arkui/napi/napi.gni")
15
16import("//build/test.gni")
17
18ohos_unittest("test_ark_interop") {
19  module_out_path = module_output_path
20
21  include_dirs = []
22  include_dirs += [
23    "../../../interfaces/inner_api/cjffi/ark_interop/",
24    "../../../interfaces/inner_api/cjffi/ark_interop_helper/",
25  ]
26
27  cflags = [ "-g3" ]
28
29  sources = [ "test_ark_interop.cpp" ]
30
31  deps = [
32    "../../..:ace_napi",
33    "../../../interfaces/inner_api/cjffi/ark_interop:ark_interop",
34  ]
35  defines = []
36  if (use_clang_coverage) {
37    defines += [ "CLANG_COVERAGE" ]
38  }
39
40  external_deps = [
41    "ets_runtime:libark_jsruntime",
42    "eventhandler:libeventhandler",
43    "hilog:libhilog",
44    "libuv:uv",
45  ]
46}
47
48ohos_unittest("test_ffi_data") {
49  module_out_path = module_output_path
50
51  include_dirs = []
52  include_dirs += [
53    "../../../interfaces/inner_api/cjffi/cj_ffi/",
54    "../../../interfaces/inner_api/cjffi/native/",
55  ]
56
57  cflags = [ "-g3" ]
58
59  sources = [ "test_ffi_data.cpp" ]
60
61  deps = [
62    "../../..:cj_bind_ffi",
63    "../../..:cj_bind_ffi_source",
64    "../../..:cj_bind_native",
65  ]
66  defines = []
67  if (use_clang_coverage) {
68    defines += [ "CLANG_COVERAGE" ]
69  }
70
71  external_deps = [
72    "hilog:libhilog",
73    "libuv:uv",
74  ]
75}
76
77group("cj_native_unittest") {
78  testonly = true
79  deps = [
80    ":test_ark_interop",
81    ":test_ffi_data",
82  ]
83}
84