1# Copyright (c) 2023 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_disp_composer_unittest") {
17  testonly = true
18  deps = [
19    ":composer_death_test",
20    ":composer_ut",
21  ]
22}
23
24module_output_path = "drivers_peripheral_display/composer"
25
26config("module_private_config") {
27  visibility = [ ":*" ]
28}
29
30ohos_unittest("composer_ut") {
31  module_out_path = module_output_path
32  sources = [ "hdi_composer_ut.cpp" ]
33  include_dirs = [
34    "../common",
35    "//commonlibrary/c_utils/base/include",
36  ]
37  deps = [ "../common:disp_dev_hdi_test_common" ]
38  external_deps = [
39    "c_utils:utils",
40    "drivers_interface_display:libdisplay_buffer_hdi_impl",
41    "drivers_interface_display:libdisplay_buffer_stub_1.0",
42    "drivers_interface_display:libdisplay_composer_hdi_impl_1.2",
43    "drivers_interface_display:libdisplay_composer_stub_1.2",
44    "googletest:gtest",
45    "graphic_surface:buffer_handle",
46    "hdf_core:libhdf_utils",
47    "hilog:libhilog",
48    "ipc:ipc_core",
49  ]
50  cflags = [ "-Wno-unused-function" ]
51  subsystem_name = "hdf"
52  part_name = "drivers_peripheral_display"
53}
54
55ohos_unittest("composer_death_test") {
56  module_out_path = module_output_path
57  sources = [ "hdi_death_test.cpp" ]
58  include_dirs = [ "../common" ]
59  deps = [ "../common:disp_dev_hdi_test_common" ]
60  external_deps = [
61    "c_utils:utils",
62    "drivers_interface_display:libdisplay_buffer_hdi_impl",
63    "drivers_interface_display:libdisplay_buffer_stub_1.0",
64    "drivers_interface_display:libdisplay_composer_hdi_impl",
65    "drivers_interface_display:libdisplay_composer_stub_1.0",
66    "googletest:gtest",
67    "graphic_surface:buffer_handle",
68    "hdf_core:libhdf_utils",
69    "hdf_core:libhdf_utils",
70    "hilog:libhilog",
71    "ipc:ipc_core",
72  ]
73  cflags = [ "-Wno-unused-function" ]
74  subsystem_name = "hdf"
75  part_name = "drivers_peripheral_display"
76}
77