• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/test.gni")
15
16group("hdf_unittest_display") {
17  testonly = true
18  deps = [
19    ":devicetest",
20    ":gfxtest",
21    ":gralloctest",
22  ]
23}
24
25module_output_path = "hdf/display"
26
27config("module_private_config") {
28  visibility = [ ":*" ]
29}
30
31ohos_static_library("disp_hdi_test_common") {
32  sources = [ "common/display_test_utils.cpp" ]
33  include_dirs = [
34    "include",
35    "//drivers/peripheral/display/interfaces/include",
36    "//drivers/peripheral/base",
37  ]
38  output_name = "disp_hdi_test_common"
39  cflags = [
40    "-DGRALLOC_GBM_SUPPORT",
41    "-Wno-macro-redefined",
42  ]
43
44  external_deps = [
45    "hiviewdfx_hilog_native:libhilog",
46    "utils_base:utils",
47  ]
48}
49
50ohos_unittest("gralloctest") {
51  module_out_path = module_output_path
52  sources = [ "display_gralloc/display_gralloc_test.cpp" ]
53  deps = [
54    "//drivers/peripheral/display/hal:hdi_display_gralloc",
55    "//third_party/googletest:gtest_main",
56  ]
57  include_dirs = [
58    "common",
59    "//drivers/peripheral/display/hal/default_standard/include",
60    "//drivers/peripheral/display/hal/default_standard/src/display_gralloc",
61    "//drivers/peripheral/display/interfaces/include",
62    "//drivers/peripheral/base",
63    "//drivers/peripheral/display/interfaces/include",
64    "//foundation/graphic/standard/utils/include",
65  ]
66  external_deps = [
67    "device_driver_framework:libhdf_utils",
68    "utils_base:utils",
69  ]
70}
71
72ohos_unittest("gfxtest") {
73  module_out_path = module_output_path
74  sources = [
75    "display_gfx/display_gfx_test.cpp",
76    "display_gfx/soft_blit.cpp",
77  ]
78  deps = [
79    "//drivers/peripheral/display/hal:hdi_display_gralloc",
80    "//third_party/googletest:gtest_main",
81  ]
82  include_dirs = [
83    "common",
84    "//foundation/graphic/standard/utils/include",
85    "//drivers/hdf/interfaces/display/include",
86    "//drivers/peripheral/display/interfaces/include",
87    "//drivers/peripheral/base",
88  ]
89  external_deps = [
90    "device_driver_framework:libhdf_utils",
91    "utils_base:utils",
92  ]
93}
94
95ohos_unittest("devicetest") {
96  module_out_path = module_output_path
97  sources = [
98    "display_device/hdi_composition_check.cpp",
99    "display_device/hdi_device_test.cpp",
100    "display_device/hdi_test_device.cpp",
101    "display_device/hdi_test_display.cpp",
102    "display_device/hdi_test_layer.cpp",
103  ]
104  deps = [
105    ":disp_hdi_test_common",
106    "//drivers/peripheral/display/hal:hdi_display_device",
107    "//drivers/peripheral/display/hal:hdi_display_gralloc",
108    "//third_party/googletest:gtest_main",
109  ]
110  include_dirs = [
111    "common",
112    "//drivers/peripheral/display/interfaces/include",
113    "//drivers/peripheral/base",
114    ".",
115  ]
116  external_deps = [
117    "device_driver_framework:libhdf_utils",
118    "hiviewdfx_hilog_native:libhilog",
119    "utils_base:utils",
120  ]
121  cflags = [ "-Wno-unused-function" ]
122}
123