• 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("//build/test.gni")
15
16UPDATER_TEST_ROOT = "//base/update/updater/test/unittest"
17
18MODULE_OUTPUT_PATH = "updater/updater_test"
19
20ohos_unittest("ui_unittest") {
21  testonly = true
22  resource_config_file =
23      "//base/update/updater/test/unittest/test_data/ohos_test.xml"
24  module_out_path = MODULE_OUTPUT_PATH
25  defines = [
26    "UPDATER_UT",
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    "lang/ui_language_unittest.cpp",
36    "strategy/ui_strategy_unittest.cpp",
37    "view/ui_component_unittest.cpp",
38    "view/ui_layout_unittest.cpp",
39    "view/ui_page_manager_unittest.cpp",
40    "view/ui_view_api_unittest.cpp",
41    "view/ui_view_proxy_unittest.cpp",
42  ]
43  sources += [
44    "//base/update/updater/services/ui/language/language_ui.cpp",
45    "//base/update/updater/services/ui/strategy/ui_strategy.cpp",
46    "//base/update/updater/services/ui/view/component/box_progress_adapter.cpp",
47    "//base/update/updater/services/ui/view/component/component_factory.cpp",
48    "//base/update/updater/services/ui/view/component/img_view_adapter.cpp",
49    "//base/update/updater/services/ui/view/component/label_btn_adapter.cpp",
50    "//base/update/updater/services/ui/view/component/text_label_adapter.cpp",
51    "//base/update/updater/services/ui/view/layout/layout_parser.cpp",
52    "//base/update/updater/services/ui/view/page/base_page.cpp",
53    "//base/update/updater/services/ui/view/page/page.cpp",
54    "//base/update/updater/services/ui/view/page/page_manager.cpp",
55    "//base/update/updater/services/ui/view/page/sub_page.cpp",
56    "//base/update/updater/services/ui/view/view_api.cpp",
57  ]
58
59  include_dirs = [
60    "//third_party/libpng",
61    "//third_party/libdrm/include/drm",
62    "//third_party/libdrm",
63    "//base/update/updater/services/include/log",
64    "//base/update/updater/services/include",
65    "//drivers/hdf_core/framework/ability/sbuf/include",
66    "//drivers/hdf_core/framework/include/platform",
67    "//drivers/hdf_core/framework/include/core",
68    "//drivers/hdf_core/framework/include/osal",
69    "//drivers/hdf_core/framework/include/utils",
70    "//drivers/hdf_core/framework/include/config",
71    "//drivers/hdf_core/framework/include",
72    "//drivers/hdf_core/adapter/uhdf2/hdi",
73    "//drivers/peripheral/input/hal/include",
74    "//drivers/peripheral/input/interfaces/include",
75    "//base/update/updater/utils/include",
76    "//base/update/updater/utils/json",
77    "//base/update/updater/services",
78    "//base/update/updater/interfaces/kits/include",
79    "//base/update/updater/services/ui",
80    "//base/update/updater/services/ui/include",
81    "//base/update/updater/services/ui/control",
82    "//base/update/updater/services/ui/driver",
83    "//base/update/updater/services/ui/strategy",
84    "//base/update/updater/services/ui/view",
85    "//base/update/updater/services/ui/language",
86    "//foundation/graphic/ui/frameworks",
87    "//foundation/graphic/ui/interfaces/kits",
88    "//foundation/graphic/ui/interfaces/innerkits",
89    "//foundation/graphic/utils/interfaces/kits",
90    "//foundation/graphic/utils/interfaces/innerkits",
91    "//base/update/updater/test/unittest/updater_ui_test",
92  ]
93  deps = [
94    "//base/update/updater/interfaces/kits/packages:libpackageExt",
95    "//base/update/updater/services/log:libupdaterlog",
96    "//base/update/updater/utils:libutils",
97    "//drivers/peripheral/input/hal:hdi_input",
98    "//foundation/graphic/ui/ext/updater:libupdater_layout",
99    "//third_party/bounds_checking_function:libsec_static",
100    "//third_party/cJSON:cjson",
101    "//third_party/googletest:gmock_main",
102    "//third_party/googletest:gtest_main",
103    "//third_party/libdrm:libdrm",
104    "//third_party/libpng:libpng",
105  ]
106  configs = [ "$UPDATER_TEST_ROOT:utest_config" ]
107  external_deps = [
108    "c_utils:utils",
109    "hiviewdfx_hilog_native:libhilog",
110  ]
111  install_enable = true
112  part_name = "updater"
113}
114