• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2025 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/graphic_surface/sync_fence"
18
19group("unittest") {
20  testonly = true
21
22  deps = [
23    ":native_fence_test",
24    ":sync_fence_test",
25  ]
26}
27
28## UnitTest sync_fence_test {{{
29ohos_unittest("sync_fence_test") {
30  module_out_path = module_out_path
31
32  sources = [
33    "acquire_fence_manager_test.cpp",
34    "frame_sched_test.cpp",
35    "sync_fence_tracker_test.cpp",
36  ]
37
38  deps = [
39    ":sync_fence_common",
40    "$graphic_surface_root/sync_fence:sync_fence_static",
41  ]
42
43  external_deps = [
44    "c_utils:utils",
45    "eventhandler:libeventhandler",
46    "hilog:libhilog",
47    "ipc:ipc_core",
48  ]
49}
50
51## UnitTest sync_fence_test }}}
52
53## UnitTest native_fence_test {{{
54ohos_unittest("native_fence_test") {
55  module_out_path = module_out_path
56
57  sources = [ "native_fence_test.cpp" ]
58
59  deps = [
60    ":sync_fence_common",
61    "$graphic_surface_root/sync_fence:sync_fence_static",
62  ]
63
64  external_deps = [
65    "c_utils:utils",
66    "eventhandler:libeventhandler",
67    "hilog:libhilog",
68    "ipc:ipc_core",
69  ]
70}
71
72## UnitTest native_fence_test }}}
73
74## Build sync_fence_common.a {{{
75config("sync_fence_common_public_config") {
76  cflags = [
77    "-Wall",
78    "-Werror",
79    "-g3",
80    "-Dprivate=public",
81    "-Dprotected=public",
82  ]
83}
84
85ohos_static_library("sync_fence_common") {
86  visibility = [ ":*" ]
87  testonly = true
88
89  public_configs = [ ":sync_fence_common_public_config" ]
90
91  subsystem_name = "graphic"
92  part_name = "graphic_surface"
93}
94## Build sync_fence_common.a }}}
95