• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2023 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/test.gni")
15import("//foundation/ability/ability_runtime/ability_runtime.gni")
16import("//foundation/arkui/ace_engine/ace_config.gni")
17
18module_output_path = "ace_engine_full/jsframework/manifest"
19
20ohos_unittest("ManifestWindowTest") {
21  module_out_path = module_output_path
22
23  sources = [ "manifest_window_test.cpp" ]
24
25  configs = [
26    ":config_manifest_test",
27    "$ace_root:ace_test_config",
28  ]
29
30  deps = [ "$ace_root/build:ace_ohos_unittest_base" ]
31
32  external_deps = [ "ability_base:configuration" ]
33
34  part_name = ace_engine_part
35}
36
37ohos_unittest("ManifestRouterTest") {
38  module_out_path = module_output_path
39
40  sources = [ "manifest_router_test.cpp" ]
41
42  configs = [
43    ":config_manifest_test",
44    "$ace_root:ace_test_config",
45  ]
46
47  deps = [ "$ace_root/build:ace_ohos_unittest_base" ]
48
49  external_deps = [ "ability_base:configuration" ]
50
51  part_name = ace_engine_part
52}
53
54ohos_unittest("ManifestParserTest") {
55  module_out_path = module_output_path
56
57  sources = [ "manifest_parser_test.cpp" ]
58
59  configs = [
60    ":config_manifest_test",
61    "$ace_root:ace_test_config",
62  ]
63
64  deps = [
65    "$ace_root/build:ace_ohos_unittest_base",
66    "//third_party/googletest:gmock_main",
67  ]
68
69  external_deps = [
70    "ability_base:configuration",
71    "ability_runtime:abilitykit_native",
72    "c_utils:utils",
73    "input:libmmi-client",
74    "ipc:ipc_single",
75    "napi:ace_napi",
76    "window_manager:libdm",
77    "window_manager:libwm",
78    "window_manager:scene_session",
79    "window_manager:scene_session_manager",
80  ]
81
82  sources += [
83    "$ace_root/test/mock/adapter/mock_mmi_event_convertor.cpp",
84    "$ace_root/test/mock/core/common/mock_udmf.cpp",
85  ]
86
87  if (ability_runtime_graphics) {
88    external_deps += [ "image_framework:image_native" ]
89  }
90  part_name = ace_engine_part
91}
92
93config("config_manifest_test") {
94  visibility = [ ":*" ]
95  include_dirs = [ "$ace_root" ]
96}
97
98group("unittest") {
99  testonly = true
100  deps = []
101
102  deps += [
103    ":ManifestParserTest",
104    ":ManifestRouterTest",
105    ":ManifestWindowTest",
106  ]
107}
108