• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 (ohos_kernel_type != "liteos_m") {
13  import("//build/lite/config/subsystem/graphic/config.gni")
14  import("//build/lite/config/test.gni")
15
16  group("lite_graphic_ui_test") {
17    if (ohos_build_type == "debug") {
18      deps = [ ":graphic_test_ui_door" ]
19    }
20  }
21
22  config("graphic_test_config") {
23    include_dirs = [
24      "../framework/include",
25      "//foundation/graphic/ui/frameworks",
26      "//foundation/graphic/ui/test/framework",
27      "//foundation/graphic/surface/interfaces/kits",
28      "//third_party/bounds_checking_function/include",
29      "//third_party/freetype/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/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_surface_view_unit_test.cpp",
83        "components/ui_swipe_view_unit_test.cpp",
84        "components/ui_time_picker_unit_test.cpp",
85        "components/ui_toggle_button_unit_test.cpp",
86        "components/ui_view_group_unit_test.cpp",
87        "components/ui_view_unit_test.cpp",
88        "dfx/event_injector_unit_test.cpp",
89        "dfx/view_bounds_unit_test.cpp",
90        "events/cancel_event_unit_test.cpp",
91        "events/click_event_unit_test.cpp",
92        "events/drag_event_unit_test.cpp",
93        "events/event_bubble_unit_test.cpp",
94        "events/event_unit_test.cpp",
95        "events/key_event_unit_test.cpp",
96        "events/long_press_event_unit_test.cpp",
97        "events/press_event_unit_test.cpp",
98        "events/release_event_unit_test.cpp",
99        "events/virtual_device_event_unit_test.cpp",
100        "font/ui_font_unit_test.cpp",
101        "layout/flex_layout_unit_test.cpp",
102        "layout/grid_layout_unit_test.cpp",
103        "layout/list_layout_unit_test.cpp",
104        "render/render_uni_test.cpp",
105        "rotate/ui_rotate_input_unit_test.cpp",
106        "themes/theme_manager_unit_test.cpp",
107      ]
108
109      deps = [ "//foundation/graphic/ui:ui" ]
110
111      if (enable_video_component) {
112        sources += [ "components/ui_video_unit_test.cpp" ]
113
114        deps += [ "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite" ]
115      }
116    }
117  }
118} else {
119  group("lite_graphic_ui_test") {
120  }
121}
122