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("cj_test_runner_object_test") {
19  module_out_path = "ability_runtime/cj_test_runner_object_test"
20  include_dirs = [
21    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app",
22    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
23    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/ability_delegator/include",
24    "${ability_runtime_services_path}/common/include",
25    "${ability_runtime_path}/interfaces/kits/native/ability/native",
26    "${ability_runtime_path}/frameworks/native",
27    "${ability_runtime_path}/interfaces/kits/native/appkit/app",
28    "${ability_runtime_path}/interfaces/kits/native/appkit/dfr",
29    "//third_party/json/include",
30    "${ability_base_kits_path}/configuration/include",
31    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_delegator",
32    "${global_path}/resource_management/interfaces/inner_api/include",
33    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper",
34    "${ability_runtime_path}/cj_environment/interfaces/inner_api",
35  ]
36
37  sources = [
38    "${ability_runtime_path}/frameworks/native/appkit/ability_delegator/runner_runtime/cj_test_runner_object.cpp",
39    "cj_test_runner_object_test.cpp",
40  ]
41  configs = [ "${c_utils_base_path}:utils_config" ]
42  cflags = []
43  if (target_cpu == "arm") {
44    cflags += [ "-DBINDER_IPC_32BIT" ]
45  }
46  deps = [
47    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
48    "${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
49    "${ability_runtime_innerkits_path}/runtime:runtime",
50    "${ability_runtime_native_path}/appkit:app_context",
51    "${ability_runtime_native_path}/appkit:delegator_mgmt",
52    "//third_party/googletest:gmock_main",
53    "//third_party/googletest:gtest_main",
54  ]
55
56  external_deps = [
57    "ability_base:want",
58    "bundle_framework:appexecfwk_base",
59    "c_utils:utils",
60    "common_event_service:cesfwk_innerkits",
61    "eventhandler:libeventhandler",
62    "hilog:libhilog",
63    "ipc:ipc_core",
64    "napi:ace_napi",
65  ]
66
67  if (ability_runtime_graphics) {
68    external_deps += [ "window_manager:libwm" ]
69  }
70}
71
72group("unittest") {
73  testonly = true
74  deps = [ ":cj_test_runner_object_test" ]
75}
76