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