BUILD.gn 4.6 KB
Newer Older
M
mamingshuai 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# 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.

import("//build/lite/config/component/lite_component.gni")
import("//build/lite/config/subsystem/graphic/config.gni")

Z
zhdengc 已提交
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
config("graphic_test_config") {
  defines = [ "ENABEL_UI_AUTO_TEST=1" ]
}

test_sources = [
  "../uitest/test_animator/ui_test_animator.cpp",
  "../uitest/test_anti_aliasing/ui_test_anti_aliasing.cpp",
  "../uitest/test_arc_label/ui_test_arc_label.cpp",
  "../uitest/test_button/ui_test_button.cpp",
  "../uitest/test_canvas/ui_test_canvas.cpp",
  "../uitest/test_chart/ui_test_chart_pillar.cpp",
  "../uitest/test_chart/ui_test_chart_polyline.cpp",
  "../uitest/test_dialog/ui_test_dialog.cpp",
  "../uitest/test_digital_clock/ui_test_digital_clock.cpp",
  "../uitest/test_draw_line/ui_test_draw_line.cpp",
  "../uitest/test_draw_rect/ui_test_draw_rect.cpp",
  "../uitest/test_event_injector/ui_test_event_injector.cpp",
  "../uitest/test_focus_manager/ui_test_focus_manager.cpp",
  "../uitest/test_font/ui_test_font.cpp",
  "../uitest/test_image/ui_test_image.cpp",
  "../uitest/test_image_animator/ui_test_image_animator.cpp",
  "../uitest/test_input_event/ui_test_input_event.cpp",
  "../uitest/test_label/ui_test_label.cpp",
  "../uitest/test_layout/ui_test_advanced_layout.cpp",
  "../uitest/test_layout/ui_test_basic_layout.cpp",
  "../uitest/test_opacity/ui_test_opacity.cpp",
  "../uitest/test_picker/ui_test_ui_picker.cpp",
  "../uitest/test_progress_bar/ui_test_box_progress.cpp",
  "../uitest/test_progress_bar/ui_test_circle_progress.cpp",
  "../uitest/test_qrcode/ui_test_qrcode.cpp",
  "../uitest/test_render/ui_test_render.cpp",
  "../uitest/test_rotate_input/ui_test_rotate_input.cpp",
  "../uitest/test_screenshot/ui_test_screenshot.cpp",
  "../uitest/test_slider/ui_test_slider.cpp",
  "../uitest/test_texture_mapper/ui_test_texture_mapper.cpp",
  "../uitest/test_transform/ui_test_transform.cpp",
  "../uitest/test_ui_analog_clock/ui_test_analog_clock.cpp",
  "../uitest/test_ui_dump_dom_tree/ui_test_dump_dom.cpp",
  "../uitest/test_ui_list/ui_test_ui_list.cpp",
  "../uitest/test_ui_list_view/ui_test_list_layout.cpp",
  "../uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp",
  "../uitest/test_ui_swipe_view/ui_test_ui_swipe_view.cpp",
  "../uitest/test_vector_font/ui_test_vector_font.cpp",
  "../uitest/test_video/ui_test_video.cpp",
59
  "../uitest/test_view_bitmap/ui_test_view_bitmap.cpp",
Z
zhdengc 已提交
60 61 62 63 64 65 66 67 68
  "../uitest/test_view_group/ui_test_view_group.cpp",
  "../uitest/test_view_percent/ui_test_view_percent.cpp",
  "../uitest/test_view_scale_rotate/ui_test_view_scale_rotate.cpp",
  "src/test_ability.cpp",
  "src/test_case_list_adapter.cpp",
  "src/ui_test_app.cpp",
  "src/ui_test_group.cpp",
]

邓志豪 已提交
69 70 71 72 73 74
test_sources += [
  "../uitest/test_render/ui_auto_test_render.cpp",
  "src/compare_tools.cpp",
  "src/ui_auto_test.cpp",
  "src/ui_auto_test_group.cpp",
]
M
mamingshuai 已提交
75
static_library("framework") {
Z
zhdengc 已提交
76 77
  sources = test_sources

M
mamingshuai 已提交
78 79 80 81 82 83 84 85 86
  include_dirs = [
    "include",
    "../uitest",
    "../../tools",
    "../../interfaces",
    "../../frameworks",
    "//foundation/multimedia/utils/lite/include",
    "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
  ]
Z
zhdengc 已提交
87

M
mamingshuai 已提交
88 89 90 91 92 93 94 95
  public_deps = [
    "//build/lite/config/component/cJSON:cjson_shared",
    "//foundation/graphic/ui:ui",
    "//foundation/graphic/wms:wms_client",
  ]
  configs += [ "//foundation/graphic/ui:graphic_define_config" ]
}

Z
zhdengc 已提交
96 97
static_library("auto_framework") {
  sources = test_sources
邓志豪 已提交
98

Z
zhdengc 已提交
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
  include_dirs = [
    "include",
    "../uitest",
    "../../tools",
    "../../interfaces",
    "../../frameworks",
    "//foundation/multimedia/utils/lite/include",
    "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
  ]

  ldflags = [
    "-lstdc++",
    "-lpthread",
    "-Wl,-rpath-link=$ohos_root_path/$root_out_dir",
  ]
  public_deps = [
    "//build/lite/config/component/cJSON:cjson_shared",
    "//foundation/graphic/ui:ui",
    "//foundation/graphic/wms:wms_client",
  ]
  configs += [
    ":graphic_test_config",
    "//foundation/graphic/ui:graphic_define_config",
  ]
}

M
mamingshuai 已提交
125 126 127 128 129 130
group("lite_graphic_test_framework") {
  public_deps = []
  if (ohos_build_type == "debug") {
    public_deps += [ ":framework" ]
  }
}