• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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_2d/opengl_wrapper"
17
18group("unittest") {
19  testonly = true
20
21  deps = [ ":opengl_wrapper_unit_test" ]
22}
23
24ohos_unittest("opengl_wrapper_unit_test") {
25  module_out_path = module_out_path
26  sources = [
27    "egl_core_test.cpp",
28    "egl_wrapper_context_test.cpp",
29    "egl_wrapper_display_test.cpp",
30    "egl_wrapper_entry_test.cpp",
31    "egl_wrapper_layer_test.cpp",
32    "egl_wrapper_loader_test.cpp",
33    "thread_private_data_ctl_test.cpp",
34  ]
35  deps = [ ":opengl_wrapper_test_common" ]
36}
37
38config("opengl_wrapper_test_common_public_config") {
39  include_dirs = [
40    "//foundation/graphic/graphic_2d/frameworks/opengl_wrapper/src",
41    "//foundation/graphic/graphic_2d/frameworks/opengl_wrapper/src/EGL",
42  ]
43
44  cflags = [
45    "-Wall",
46    "-Werror",
47    "-g3",
48    "-Dprivate=public",
49    "-Dprotected=public",
50  ]
51}
52
53ohos_static_library("opengl_wrapper_test_common") {
54  visibility = [ ":*" ]
55  testonly = true
56
57  public_configs = [ ":opengl_wrapper_test_common_public_config" ]
58
59  public_deps = [
60    "//commonlibrary/c_utils/base:utils",
61    "//foundation/graphic/graphic_2d/frameworks/opengl_wrapper:EGL",
62    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
63    "//third_party/googletest:gmock",
64    "//third_party/googletest:gtest_main",
65  ]
66
67  external_deps = [ "hilog:libhilog" ]
68  subsystem_name = "graphic"
69  part_name = "graphic_2d"
70}
71