• 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    ":gralloctest",
21  ]
22}
23
24module_output_path = "hdf/display"
25
26config("module_private_config") {
27  visibility = [ ":*" ]
28}
29
30ohos_static_library("disp_hdi_test_common") {
31  sources = [ "common/display_test_utils.cpp" ]
32  include_dirs = [
33    "include",
34    "//drivers/peripheral/display/interfaces/include",
35    "//drivers/peripheral/base",
36  ]
37  output_name = "disp_hdi_test_common"
38  cflags = [
39    "-DGRALLOC_GBM_SUPPORT",
40    "-Wno-macro-redefined",
41  ]
42
43  external_deps = [
44    "c_utils:utils",
45    "hiviewdfx_hilog_native:libhilog",
46  ]
47  subsystem_name = "hdf"
48  part_name = "drivers_peripheral_display"
49}
50
51ohos_unittest("gralloctest") {
52  module_out_path = module_output_path
53  sources = [ "display_gralloc/display_gralloc_test.cpp" ]
54  deps = [
55    "//drivers/peripheral/display/hal:hdi_display_gralloc",
56    "//third_party/googletest:gtest_main",
57  ]
58  include_dirs = [
59    "common",
60    "//drivers/peripheral/display/hal/default_standard/include",
61    "//drivers/peripheral/display/hal/default_standard/src/display_gralloc",
62    "//drivers/peripheral/display/interfaces/include",
63    "//drivers/peripheral/base",
64    "//drivers/peripheral/display/interfaces/include",
65    "//foundation/graphic/standard/utils/include",
66  ]
67  external_deps = [
68    "c_utils:utils",
69    "hdf_core:libhdf_utils",
70  ]
71}
72
73ohos_unittest("gfxtest") {
74  module_out_path = module_output_path
75  sources = [
76    "display_gfx/display_gfx_test.cpp",
77    "display_gfx/soft_blit.cpp",
78  ]
79  deps = [
80    "//drivers/peripheral/display/hal:hdi_display_gralloc",
81    "//third_party/googletest:gtest_main",
82  ]
83  include_dirs = [
84    "common",
85    "//foundation/graphic/standard/utils/include",
86    "//drivers/hdf/interfaces/display/include",
87    "//drivers/peripheral/display/interfaces/include",
88    "//drivers/peripheral/base",
89  ]
90  external_deps = [
91    "c_utils:utils",
92    "hdf_core:libhdf_utils",
93  ]
94}
95
96ohos_unittest("devicetest") {
97  module_out_path = module_output_path
98  sources = [
99    "display_device/hdi_composition_check.cpp",
100    "display_device/hdi_device_test.cpp",
101    "display_device/hdi_test_device.cpp",
102    "display_device/hdi_test_display.cpp",
103    "display_device/hdi_test_layer.cpp",
104  ]
105  deps = [
106    ":disp_hdi_test_common",
107    "//drivers/peripheral/display/hal:hdi_display_device",
108    "//drivers/peripheral/display/hal:hdi_display_gralloc",
109    "//third_party/googletest:gtest_main",
110  ]
111  include_dirs = [
112    "common",
113    "//drivers/peripheral/display/interfaces/include",
114    "//drivers/peripheral/base",
115    ".",
116  ]
117  external_deps = [
118    "c_utils:utils",
119    "hdf_core:libhdf_utils",
120    "hiviewdfx_hilog_native:libhilog",
121  ]
122  cflags = [ "-Wno-unused-function" ]
123}
124