• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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")
15import("//foundation/graphic/graphic_surface/graphic_surface_config.gni")
16
17module_out_path = "graphic_surface/surface"
18
19group("unittest") {
20  testonly = true
21
22  deps = [
23    ":native_window_buffer_test_st",
24    ":native_window_test_st",
25    ":surface_ipc_test_st",
26    ":surface_ipc_with_dropframe_test_st",
27    ":surface_ipc_with_invaild_pts_test_st",
28    ":surface_ipc_with_pts_test_st",
29  ]
30}
31
32## SystemTest native_window_buffer_test {{{
33ohos_unittest("native_window_buffer_test_st") {
34  module_out_path = module_out_path
35
36  sources = [ "native_window_buffer_test.cpp" ]
37
38  include_dirs = [ "$graphic_surface_root/surface/include" ]
39
40  cflags = [
41    "-Wall",
42    "-Werror",
43    "-g3",
44    "-Dprivate=public",
45    "-Dprotected=public",
46  ]
47
48  deps = [
49    "$graphic_surface_root/buffer_handle:buffer_handle",
50    "$graphic_surface_root/surface:surface",
51  ]
52
53  external_deps = [
54    "access_token:libaccesstoken_sdk",
55    "access_token:libnativetoken",
56    "access_token:libtoken_setproc",
57    "c_utils:utils",
58    "googletest:gtest_main",
59    "hilog:libhilog",
60    "ipc:ipc_core",
61    "samgr:samgr_proxy",
62  ]
63}
64
65## SystemTest native_window_buffer_test }}}
66
67## SystemTest native_window_test {{{
68ohos_unittest("native_window_test_st") {
69  module_out_path = module_out_path
70
71  sources = [ "native_window_test.cpp" ]
72
73  include_dirs = [ "$graphic_surface_root/surface/include" ]
74
75  cflags = [
76    "-Wall",
77    "-Werror",
78    "-g3",
79    "-Dprivate=public",
80    "-Dprotected=public",
81  ]
82
83  deps = [
84    "$graphic_surface_root/buffer_handle:buffer_handle",
85    "$graphic_surface_root/surface:surface",
86  ]
87
88  external_deps = [
89    "c_utils:utils",
90    "googletest:gtest_main",
91    "hilog:libhilog",
92    "ipc:ipc_core",
93  ]
94}
95
96## SystemTest native_window_test }}}
97
98## SystemTest surface_ipc_test {{{
99ohos_unittest("surface_ipc_test_st") {
100  module_out_path = module_out_path
101
102  sources = [ "surface_ipc_test.cpp" ]
103
104  include_dirs = [ "$graphic_surface_root/surface/include" ]
105
106  cflags = [
107    "-Wall",
108    "-Werror",
109    "-g3",
110  ]
111
112  deps = [ "$graphic_surface_root/surface:surface" ]
113
114  external_deps = [
115    "access_token:libaccesstoken_sdk",
116    "access_token:libnativetoken",
117    "access_token:libtoken_setproc",
118    "c_utils:utils",
119    "googletest:gtest_main",
120    "hilog:libhilog",
121    "ipc:ipc_core",
122    "samgr:samgr_proxy",
123  ]
124}
125
126## SystemTest surface_ipc_test }}}
127
128## SystemTest surface_ipc_with_pts_test_st {{{
129ohos_unittest("surface_ipc_with_pts_test_st") {
130  module_out_path = module_out_path
131
132  sources = [ "surface_ipc_with_pts_test.cpp" ]
133
134  include_dirs = [ "$graphic_surface_root/surface/include" ]
135
136  cflags = [
137    "-Wall",
138    "-Werror",
139    "-g3",
140  ]
141
142  deps = [
143    "$graphic_surface_root/surface:surface",
144    "$graphic_surface_root/sync_fence:sync_fence",
145  ]
146
147  external_deps = [
148    "access_token:libaccesstoken_sdk",
149    "access_token:libnativetoken",
150    "access_token:libtoken_setproc",
151    "c_utils:utils",
152    "googletest:gtest_main",
153    "hilog:libhilog",
154    "ipc:ipc_core",
155    "samgr:samgr_proxy",
156  ]
157}
158
159## SystemTest surface_ipc_with_pts_test_st }}}
160
161## SystemTest surface_ipc_with_invaild_pts_test_st {{{
162ohos_unittest("surface_ipc_with_invaild_pts_test_st") {
163  module_out_path = module_out_path
164
165  sources = [ "surface_ipc_with_invaild_pts_test.cpp" ]
166
167  include_dirs = [ "$graphic_surface_root/surface/include" ]
168
169  cflags = [
170    "-Wall",
171    "-Werror",
172    "-g3",
173  ]
174
175  deps = [
176    "$graphic_surface_root/surface:surface",
177    "$graphic_surface_root/sync_fence:sync_fence",
178  ]
179
180  external_deps = [
181    "access_token:libaccesstoken_sdk",
182    "access_token:libnativetoken",
183    "access_token:libtoken_setproc",
184    "c_utils:utils",
185    "googletest:gtest_main",
186    "hilog:libhilog",
187    "ipc:ipc_core",
188    "samgr:samgr_proxy",
189  ]
190}
191
192## SystemTest surface_ipc_with_invaild_pts_test_st }}}
193
194## SystemTest surface_ipc_with_dropframe_test_st {{{
195ohos_unittest("surface_ipc_with_dropframe_test_st") {
196  module_out_path = module_out_path
197
198  sources = [ "surface_ipc_with_dropframe_test.cpp" ]
199
200  include_dirs = [ "$graphic_surface_root/surface/include" ]
201
202  cflags = [
203    "-Wall",
204    "-Werror",
205    "-g3",
206  ]
207
208  deps = [
209    "$graphic_surface_root/surface:surface",
210    "$graphic_surface_root/sync_fence:sync_fence",
211  ]
212
213  external_deps = [
214    "access_token:libaccesstoken_sdk",
215    "access_token:libnativetoken",
216    "access_token:libtoken_setproc",
217    "c_utils:utils",
218    "googletest:gtest_main",
219    "hilog:libhilog",
220    "ipc:ipc_core",
221    "samgr:samgr_proxy",
222  ]
223}
224## SystemTest surface_ipc_with_dropframe_test_st }}}
225