• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("//base/update/updater/updater_default_cfg.gni")
15import("//build/test.gni")
16
17MODULE_OUTPUT_PATH = "updater/updater"
18updater_path = rebase_path("${updater_absolutely_path}", ".")
19
20ohos_unittest("ui_unittest") {
21  testonly = true
22  resource_config_file = "${updater_path}/test/unittest/test_data/ohos_test.xml"
23  module_out_path = MODULE_OUTPUT_PATH
24  defines = [
25    "UPDATER_UT",
26    "UPDATER_UI_SUPPORT",
27    "ENABLE_BITMAP_FONT = 0",
28    "ENABLE_ICU = 0",
29    "ENABLE_MULTI_FONT = 0",
30    "ENABLE_SHAPING = 0",
31    "ENABLE_STATIC_FONT = 0",
32    "ENABLE_VECTOR_FONT = 1",
33  ]
34  sources = [
35    "control/ui_control_unittest.cpp",
36    "driver/fbdev_driver_unittest.cpp",
37    "driver/keys_input_device_unittest.cpp",
38    "driver/pointers_input_device_unittest.cpp",
39    "driver/ui_rotation_unittest.cpp",
40    "lang/ui_language_unittest.cpp",
41    "strategy/ui_strategy_unittest.cpp",
42    "view/ui_component_unittest.cpp",
43    "view/ui_graphic_engine_unittest.cpp",
44    "view/ui_layout_unittest.cpp",
45    "view/ui_page_manager_unittest.cpp",
46    "view/ui_view_api_unittest.cpp",
47    "view/ui_view_proxy_unittest.cpp",
48  ]
49  sources += [
50    "${updater_path}/services/ui/control/event_listener.cpp",
51    "${updater_path}/services/ui/driver/drm_driver.cpp",
52    "${updater_path}/services/ui/driver/fbdev_driver.cpp",
53    "${updater_path}/services/ui/driver/graphic_engine.cpp",
54    "${updater_path}/services/ui/driver/keys_input_device.cpp",
55    "${updater_path}/services/ui/driver/pointers_input_device.cpp",
56    "${updater_path}/services/ui/driver/surface_dev.cpp",
57    "${updater_path}/services/ui/driver/ui_rotation.cpp",
58    "${updater_path}/services/ui/language/language_ui.cpp",
59    "${updater_path}/services/ui/strategy/ui_strategy.cpp",
60    "${updater_path}/services/ui/view/component/box_progress_adapter.cpp",
61    "${updater_path}/services/ui/view/component/img_view_adapter.cpp",
62    "${updater_path}/services/ui/view/component/label_btn_adapter.cpp",
63    "${updater_path}/services/ui/view/component/text_label_adapter.cpp",
64    "${updater_path}/services/ui/view/component/component_register.cpp",
65    "${updater_path}/services/ui/view/layout/auto_layout.cpp",
66    "${updater_path}/services/ui/view/layout/layout_parser.cpp",
67    "${updater_path}/services/ui/view/page/base_page.cpp",
68    "${updater_path}/services/ui/view/page/page.cpp",
69    "${updater_path}/services/ui/view/page/page_manager.cpp",
70    "${updater_path}/services/ui/view/page/sub_page.cpp",
71    "${updater_path}/services/ui/view/view_api.cpp",
72  ]
73
74  include_dirs = [
75    "${updater_path}/services/include/log",
76    "${updater_path}/services/include",
77    "${updater_path}/utils/include",
78    "${updater_path}/utils/json",
79    "${updater_path}/services",
80    "${updater_path}/interfaces/kits/include",
81    "${updater_path}/services/ui",
82    "${updater_path}/services/ui/include",
83    "${updater_path}/services/ui/control",
84    "${updater_path}/services/ui/driver",
85    "${updater_path}/services/ui/strategy",
86    "${updater_path}/services/ui/view",
87    "${updater_path}/services/ui/language",
88    "${updater_path}/test/unittest/updater_ui_test",
89  ]
90  deps = [
91    "${updater_path}/interfaces/kits/misc_info:libmiscinfo",
92    "${updater_path}/interfaces/kits/packages:libpackageExt",
93    "${updater_path}/services/log:libupdaterlog",
94    "${updater_path}/utils:libutils",
95  ]
96  configs = [ "${updater_path}/test/unittest:utest_config" ]
97  external_deps = [
98    "bounds_checking_function:libsec_static",
99    "cJSON:cjson",
100    "c_utils:utils",
101    "drivers_interface_input:libinput_proxy_1.0",
102    "googletest:gmock_main",
103    "googletest:gtest_main",
104    "hilog:libhilog",
105    "libdrm:libdrm",
106    "libpng:libpng",
107    "ui_lite:libupdater_layout",
108    "graphic_utils_lite:utils_lite",
109  ]
110  install_enable = true
111  part_name = "updater"
112}
113