1# Copyright (c) 2022 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/utils"
18
19group("unittest") {
20  testonly = true
21
22  deps = [ ":sync_fence_test" ]
23}
24
25## UnitTest sync_fence_test {{{
26ohos_unittest("sync_fence_test") {
27  module_out_path = module_out_path
28
29  sources = [
30    "acquire_fence_manager_test.cpp",
31    "frame_sched_test.cpp",
32    "sync_fence_tracker_test.cpp",
33  ]
34
35  deps = [
36    ":sync_fence_common",
37    "$graphic_surface_root/sync_fence:sync_fence",
38  ]
39
40  external_deps = [
41    "c_utils:utils",
42    "hilog:libhilog",
43    "ipc:ipc_core",
44  ]
45}
46
47## UnitTest sync_fence_test }}}
48
49## Build sync_fence_common.a {{{
50config("sync_fence_common_public_config") {
51  cflags = [
52    "-Wall",
53    "-Werror",
54    "-g3",
55    "-Dprivate=public",
56    "-Dprotected=public",
57  ]
58}
59
60ohos_static_library("sync_fence_common") {
61  visibility = [ ":*" ]
62  testonly = true
63
64  public_configs = [ ":sync_fence_common_public_config" ]
65
66  subsystem_name = "graphic"
67  part_name = "graphic_surface"
68}
69## Build sync_fence_common.a }}}
70