• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
15
16module_out_path = "graphic_standard/vulkan_wrapper"
17
18group("unittest") {
19  testonly = true
20
21  deps = [ ":vulkan_wrapper_unit_test" ]
22}
23
24ohos_unittest("vulkan_wrapper_unit_test") {
25  module_out_path = module_out_path
26  sources = [
27    "../../src/driver.cpp",
28    "../../src/driver_loader.cpp",
29    "../../src/swapchain.cpp",
30    "vulkan_wrapper_unit_test.cpp",
31  ]
32  deps = [ ":vulkan_wrapper_test_common" ]
33}
34
35config("vulkan_wrapper_test_common_public_config") {
36  include_dirs = [
37    "//foundation/graphic/graphic_2d/frameworks/surface/include",
38    "//foundation/graphic/graphic_2d/interfaces/inner_api/surface",
39    "//foundation/graphic/graphic_2d/interfaces/inner_api/common",
40    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client",
41    "//foundation/window/window_manager/interfaces/innerkits",
42    "//foundation/graphic/graphic_2d/frameworks/vulkan_wrapper/include",
43  ]
44
45  cflags = [
46    "-Wall",
47    "-Werror",
48    "-g3",
49    "-Dprivate=public",
50    "-Dprotected=public",
51  ]
52}
53
54ohos_static_library("vulkan_wrapper_test_common") {
55  visibility = [ ":*" ]
56  testonly = true
57
58  public_configs = [ ":vulkan_wrapper_test_common_public_config" ]
59
60  public_deps = [
61    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
62    "//foundation/graphic/graphic_2d:libsurface",
63    "//foundation/graphic/graphic_2d/frameworks/surface:surface",
64    "//foundation/graphic/graphic_2d/frameworks/vulkan_wrapper:vulkan",
65    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
66    "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base",
67    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
68    "//foundation/graphic/graphic_2d/utils:libgraphic_utils",
69    "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk",
70    "//foundation/window/window_manager/wm:libwm",
71    "//foundation/window/window_manager/wmserver:libwms",
72    "//third_party/googletest:gtest_main",
73    "//third_party/vulkan-headers:vulkan_headers",
74    "//third_party/zlib:libz",
75  ]
76  subsystem_name = "graphic"
77  part_name = "graphic_standard"
78}
79