1a3e0fd82Sopenharmony_ci# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
2a3e0fd82Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3a3e0fd82Sopenharmony_ci# you may not use this file except in compliance with the License.
4a3e0fd82Sopenharmony_ci# You may obtain a copy of the License at
5a3e0fd82Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
6a3e0fd82Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
7a3e0fd82Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
8a3e0fd82Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9a3e0fd82Sopenharmony_ci# See the License for the specific language governing permissions and
10a3e0fd82Sopenharmony_ci# limitations under the License.
11a3e0fd82Sopenharmony_ci
12a3e0fd82Sopenharmony_ciif (os_level != "standard") {
13a3e0fd82Sopenharmony_ci  if (defined(ohos_kernel_type) && ohos_kernel_type != "liteos_m") {
14a3e0fd82Sopenharmony_ci    import("//build/lite/config/subsystem/graphic/config.gni")
15a3e0fd82Sopenharmony_ci    import("//build/lite/config/test.gni")
16a3e0fd82Sopenharmony_ci
17a3e0fd82Sopenharmony_ci    group("arkui_ui_lite_test") {
18a3e0fd82Sopenharmony_ci      if (ohos_build_type == "debug") {
19a3e0fd82Sopenharmony_ci        deps = [ ":graphic_test_ui_door" ]
20a3e0fd82Sopenharmony_ci      }
21a3e0fd82Sopenharmony_ci    }
22a3e0fd82Sopenharmony_ci
23a3e0fd82Sopenharmony_ci    config("graphic_test_config") {
24a3e0fd82Sopenharmony_ci      include_dirs = [
25a3e0fd82Sopenharmony_ci        "../framework/include",
26a3e0fd82Sopenharmony_ci        "//foundation/arkui/ui_lite/frameworks",
27a3e0fd82Sopenharmony_ci        "//foundation/arkui/ui_lite/test/framework",
28a3e0fd82Sopenharmony_ci        "//foundation/graphic/surface_lite/interfaces/kits",
29a3e0fd82Sopenharmony_ci        "//third_party/bounds_checking_function/include",
30a3e0fd82Sopenharmony_ci        "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
31a3e0fd82Sopenharmony_ci        "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
32a3e0fd82Sopenharmony_ci        "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/communication/broadcast",
33a3e0fd82Sopenharmony_ci        "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
34a3e0fd82Sopenharmony_ci        "//foundation/multimedia/media_utils_lite/interfaces/kits",
35a3e0fd82Sopenharmony_ci      ]
36a3e0fd82Sopenharmony_ci      ldflags = [
37a3e0fd82Sopenharmony_ci        "-lstdc++",
38a3e0fd82Sopenharmony_ci        "-Wl,-rpath-link=$ohos_root_path/$root_out_dir",
39a3e0fd82Sopenharmony_ci      ]
40a3e0fd82Sopenharmony_ci    }
41a3e0fd82Sopenharmony_ci
42a3e0fd82Sopenharmony_ci    if (ohos_build_type == "debug") {
43a3e0fd82Sopenharmony_ci      unittest("graphic_test_ui_door") {
44a3e0fd82Sopenharmony_ci        output_extension = "bin"
45a3e0fd82Sopenharmony_ci        output_dir = "$root_out_dir/test/unittest/graphic"
46a3e0fd82Sopenharmony_ci        configs = [ ":graphic_test_config" ]
47a3e0fd82Sopenharmony_ci        sources = [
48a3e0fd82Sopenharmony_ci          "animator/animator_unit_test.cpp",
49a3e0fd82Sopenharmony_ci          "animator/easing_equation_unit_test.cpp",
50a3e0fd82Sopenharmony_ci          "animator/interpolation_unit_test.cpp",
51a3e0fd82Sopenharmony_ci          "common/focus_manager_unit_test.cpp",
52a3e0fd82Sopenharmony_ci          "common/hardware_acceleration_unit_test.cpp",
53a3e0fd82Sopenharmony_ci          "common/input_method_manager_unit_test.cpp",
54a3e0fd82Sopenharmony_ci          "common/screen_unit_test.cpp",
55a3e0fd82Sopenharmony_ci          "common/text_unit_test.cpp",
56a3e0fd82Sopenharmony_ci          "components/ui_abstract_clock_unit_test.cpp",
57a3e0fd82Sopenharmony_ci          "components/ui_abstract_progress_unit_test.cpp",
58a3e0fd82Sopenharmony_ci          "components/ui_analog_clock_unit_test.cpp",
59a3e0fd82Sopenharmony_ci          "components/ui_arc_label_unit_test.cpp",
60a3e0fd82Sopenharmony_ci          "components/ui_axis_unit_test.cpp",
61a3e0fd82Sopenharmony_ci          "components/ui_box_progress_unit_test.cpp",
62a3e0fd82Sopenharmony_ci          "components/ui_button_unit_test.cpp",
63a3e0fd82Sopenharmony_ci          "components/ui_canvas_unit_test.cpp",
64a3e0fd82Sopenharmony_ci          "components/ui_chart_unit_test.cpp",
65a3e0fd82Sopenharmony_ci          "components/ui_checkbox_unit_test.cpp",
66a3e0fd82Sopenharmony_ci          "components/ui_circle_progress_unit_test.cpp",
67a3e0fd82Sopenharmony_ci          "components/ui_dialog_unit_test.cpp",
68a3e0fd82Sopenharmony_ci          "components/ui_digital_clock_unit_test.cpp",
69a3e0fd82Sopenharmony_ci          "components/ui_edit_text_unit_test.cpp",
70a3e0fd82Sopenharmony_ci          "components/ui_image_animator_unit_test.cpp",
71a3e0fd82Sopenharmony_ci          "components/ui_image_unit_test.cpp",
72a3e0fd82Sopenharmony_ci          "components/ui_label_button_unit_test.cpp",
73a3e0fd82Sopenharmony_ci          "components/ui_label_unit_test.cpp",
74a3e0fd82Sopenharmony_ci          "components/ui_list_unit_test.cpp",
75a3e0fd82Sopenharmony_ci          "components/ui_picker_unit_test.cpp",
76a3e0fd82Sopenharmony_ci          "components/ui_qrcode_unit_test.cpp",
77a3e0fd82Sopenharmony_ci          "components/ui_radio_button_unit_test.cpp",
78a3e0fd82Sopenharmony_ci          "components/ui_repeat_button_unit_test.cpp",
79a3e0fd82Sopenharmony_ci          "components/ui_scroll_bar_test.cpp",
80a3e0fd82Sopenharmony_ci          "components/ui_scroll_view_unit_test.cpp",
81a3e0fd82Sopenharmony_ci          "components/ui_slider_unit_test.cpp",
82a3e0fd82Sopenharmony_ci          "components/ui_spannable_string_unit_test.cpp",
83a3e0fd82Sopenharmony_ci          "components/ui_surface_view_unit_test.cpp",
84a3e0fd82Sopenharmony_ci          "components/ui_swipe_view_unit_test.cpp",
85a3e0fd82Sopenharmony_ci          "components/ui_time_picker_unit_test.cpp",
86a3e0fd82Sopenharmony_ci          "components/ui_toggle_button_unit_test.cpp",
87a3e0fd82Sopenharmony_ci          "components/ui_view_group_unit_test.cpp",
88a3e0fd82Sopenharmony_ci          "components/ui_view_unit_test.cpp",
89a3e0fd82Sopenharmony_ci          "dfx/event_injector_unit_test.cpp",
90a3e0fd82Sopenharmony_ci          "dfx/view_bounds_unit_test.cpp",
91a3e0fd82Sopenharmony_ci          "events/cancel_event_unit_test.cpp",
92a3e0fd82Sopenharmony_ci          "events/click_event_unit_test.cpp",
93a3e0fd82Sopenharmony_ci          "events/drag_event_unit_test.cpp",
94a3e0fd82Sopenharmony_ci          "events/event_bubble_unit_test.cpp",
95a3e0fd82Sopenharmony_ci          "events/event_unit_test.cpp",
96a3e0fd82Sopenharmony_ci          "events/key_event_unit_test.cpp",
97a3e0fd82Sopenharmony_ci          "events/long_press_event_unit_test.cpp",
98a3e0fd82Sopenharmony_ci          "events/press_event_unit_test.cpp",
99a3e0fd82Sopenharmony_ci          "events/release_event_unit_test.cpp",
100a3e0fd82Sopenharmony_ci          "events/virtual_device_event_unit_test.cpp",
101a3e0fd82Sopenharmony_ci          "font/ui_font_unit_test.cpp",
102a3e0fd82Sopenharmony_ci          "layout/flex_layout_unit_test.cpp",
103a3e0fd82Sopenharmony_ci          "layout/grid_layout_unit_test.cpp",
104a3e0fd82Sopenharmony_ci          "layout/list_layout_unit_test.cpp",
105a3e0fd82Sopenharmony_ci          "render/render_uni_test.cpp",
106a3e0fd82Sopenharmony_ci          "rotate/ui_rotate_input_unit_test.cpp",
107a3e0fd82Sopenharmony_ci          "themes/theme_manager_unit_test.cpp",
108a3e0fd82Sopenharmony_ci        ]
109a3e0fd82Sopenharmony_ci
110a3e0fd82Sopenharmony_ci        deps = [
111a3e0fd82Sopenharmony_ci          "//foundation/arkui/ui_lite:ui",
112a3e0fd82Sopenharmony_ci          "//third_party/freetype:freetype",
113a3e0fd82Sopenharmony_ci        ]
114a3e0fd82Sopenharmony_ci
115a3e0fd82Sopenharmony_ci        if (ui_lite_enable_video_component_config) {
116a3e0fd82Sopenharmony_ci          sources += [ "components/ui_video_unit_test.cpp" ]
117a3e0fd82Sopenharmony_ci
118a3e0fd82Sopenharmony_ci          deps += [ "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite" ]
119a3e0fd82Sopenharmony_ci        }
120a3e0fd82Sopenharmony_ci      }
121a3e0fd82Sopenharmony_ci    }
122a3e0fd82Sopenharmony_ci  } else {
123a3e0fd82Sopenharmony_ci    group("arkui_ui_lite_test") {
124a3e0fd82Sopenharmony_ci    }
125a3e0fd82Sopenharmony_ci  }
126a3e0fd82Sopenharmony_ci} else {
127a3e0fd82Sopenharmony_ci  group("arkui_ui_lite_test") {
128a3e0fd82Sopenharmony_ci  }
129a3e0fd82Sopenharmony_ci}
130