BUILD.gn 4.5 KB
Newer Older
M
mamingshuai 已提交
1 2 3 4 5 6 7 8 9 10
# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#     http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
N
niulihua 已提交
11
import("//build/lite/config/subsystem/graphic/config.gni")
M
mamingshuai 已提交
12 13 14 15
import("//build/lite/config/test.gni")

group("lite_graphic_ui_test") {
  if (ohos_build_type == "debug") {
Z
zhdengc 已提交
16
    deps = [ ":graphic_test_ui_door" ]
M
mamingshuai 已提交
17 18 19 20 21 22 23 24 25 26 27 28 29 30
  }
}

config("graphic_test_config") {
  include_dirs = [
    "../framework/include",
    "//foundation/graphic/ui/frameworks",
    "//foundation/graphic/surface/interfaces/kits",
    "//third_party/bounds_checking_function/include",
    "//third_party/freetype/include",
    "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry",
    "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
    "//foundation/distributedschedule/samgr_lite/interfaces/kits/communication/broadcast",
    "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
H
hangliebe 已提交
31
    "//foundation/multimedia/utils/lite/interfaces/kits",
M
mamingshuai 已提交
32 33 34 35 36 37 38 39
  ]
  ldflags = [
    "-lstdc++",
    "-Wl,-rpath-link=$ohos_root_path/$root_out_dir",
  ]
}

if (ohos_build_type == "debug") {
Z
zhdengc 已提交
40
  unittest("graphic_test_ui_door") {
M
mamingshuai 已提交
41 42 43 44 45 46 47
    output_extension = "bin"
    output_dir = "$root_out_dir/test/unittest/graphic"
    configs = [ ":graphic_test_config" ]
    sources = [
      "animator/animator_unit_test.cpp",
      "animator/easing_equation_unit_test.cpp",
      "animator/interpolation_unit_test.cpp",
Z
zhdengc 已提交
48
      "common/focus_manager_unit_test.cpp",
M
mamingshuai 已提交
49 50 51 52 53 54
      "common/hardware_acceleration_unit_test.cpp",
      "common/screen_unit_test.cpp",
      "common/text_unit_test.cpp",
      "components/ui_abstract_progress_unit_test.cpp",
      "components/ui_analog_clock_unit_test.cpp",
      "components/ui_arc_label_unit_test.cpp",
Z
zhdengc 已提交
55 56 57
      "components/ui_axis_unit_test.cpp",
      "components/ui_box_progress_unit_test.cpp",
      "components/ui_button_unit_test.cpp",
M
mamingshuai 已提交
58 59
      "components/ui_canvas_unit_test.cpp",
      "components/ui_chart_unit_test.cpp",
Z
zhdengc 已提交
60 61 62 63
      "components/ui_checkbox_unit_test.cpp",
      "components/ui_circle_progress_unit_test.cpp",
      "components/ui_dialog_unit_test.cpp",
      "components/ui_digital_clock_unit_test.cpp",
M
mamingshuai 已提交
64 65
      "components/ui_image_animator_unit_test.cpp",
      "components/ui_image_unit_test.cpp",
Z
zhdengc 已提交
66 67
      "components/ui_label_button_unit_test.cpp",
      "components/ui_label_unit_test.cpp",
M
mamingshuai 已提交
68
      "components/ui_picker_unit_test.cpp",
Z
zhdengc 已提交
69 70 71
      "components/ui_qrcode_unit_test.cpp",
      "components/ui_radio_button_unit_test.cpp",
      "components/ui_repeat_button_unit_test.cpp",
72
      "components/ui_list_unit_test.cpp",
Y
YueBiang 已提交
73
      "components/ui_scroll_bar_test.cpp",
M
mamingshuai 已提交
74
      "components/ui_scroll_view_unit_test.cpp",
Z
zhdengc 已提交
75
      "components/ui_slider_unit_test.cpp",
M
mamingshuai 已提交
76 77
      "components/ui_surface_view_unit_test.cpp",
      "components/ui_swipe_view_unit_test.cpp",
Z
zhdengc 已提交
78 79
      "components/ui_time_picker_unit_test.cpp",
      "components/ui_toggle_button_unit_test.cpp",
M
mamingshuai 已提交
80 81
      "components/ui_view_group_unit_test.cpp",
      "components/ui_view_unit_test.cpp",
Z
zhdengc 已提交
82
      "dfx/event_injector_unit_test.cpp",
P
pssea 已提交
83
      "dfx/view_bounds_unit_test.cpp",
Z
zhdengc 已提交
84 85 86 87 88 89 90 91 92 93 94 95
      "events/cancel_event_unit_test.cpp",
      "events/click_event_unit_test.cpp",
      "events/drag_event_unit_test.cpp",
      "events/event_bubble_unit_test.cpp",
      "events/event_unit_test.cpp",
      "events/key_event_unit_test.cpp",
      "events/long_press_event_unit_test.cpp",
      "events/press_event_unit_test.cpp",
      "events/release_event_unit_test.cpp",
      "events/virtual_device_event_unit_test.cpp",
      "font/ui_font_unit_test.cpp",
      "image/image_load_unit_test.cpp",
96 97
      "layout/flex_layout_unit_test.cpp",
      "layout/grid_layout_unit_test.cpp",
Z
zhdengc 已提交
98 99 100 101
      "layout/list_layout_unit_test.cpp",
      "render/render_uni_test.cpp",
      "rotate/ui_rotate_input_unit_test.cpp",
      "themes/theme_manager_unit_test.cpp",
M
mamingshuai 已提交
102
    ]
103 104 105 106 107

    deps = [
      "//foundation/graphic/ui:ui",
    ]

N
niulihua 已提交
108 109 110 111
    if (enable_video_component) {
      sources += [
        "components/ui_video_unit_test.cpp",
      ]
112 113 114 115

      deps += [
        "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite",
      ]
N
niulihua 已提交
116
    }
M
mamingshuai 已提交
117 118
  }
}