• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
15import("//foundation/graphic/graphic_2d/graphic_config.gni")
16
17module_out_path = "graphic_2d/graphic_2d/vulkan_layers"
18
19group("unittest") {
20  testonly = true
21
22  deps = [ ":vulkan_loader_unit_test" ]
23}
24
25ohos_unittest("vulkan_loader_unit_test") {
26  module_out_path = module_out_path
27  sources = [ "vulkan_loader_unit_test.cpp" ]
28  deps = [ ":vulkan_loader_test_common" ]
29}
30
31config("vulkan_loader_test_common_public_config") {
32  include_dirs = [
33    "$graphic_2d_root/interfaces/inner_api/common",
34    "$graphic_2d_root/rosen/modules/render_service_client",
35  ]
36
37  cflags = [
38    "-Wall",
39    "-Werror",
40    "-g3",
41    "-Dprivate=public",
42    "-Dprotected=public",
43  ]
44}
45
46ohos_static_library("vulkan_loader_test_common") {
47  visibility = [ ":*" ]
48  testonly = true
49
50  public_configs = [ ":vulkan_loader_test_common_public_config" ]
51
52  public_deps = [
53    "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics",
54    "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base",
55    "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client",
56    "$graphic_2d_root/utils:libgraphic_utils",
57  ]
58  public_external_deps = [
59    "eventhandler:libeventhandler",
60    "vulkan-headers:vulkan_headers",
61    "zlib:libz",
62  ]
63  external_deps = [
64    "c_utils:utils",
65    "googletest:gtest_main",
66    "hilog:libhilog",
67  ]
68  subsystem_name = "graphic"
69  part_name = "graphic_2d"
70}
71