• 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")
15import("//foundation/graphic/graphic_2d/graphic_config.gni")
16
17module_out_path = "graphic_2d/opengl_wrapper"
18
19group("unittest") {
20  testonly = true
21
22  deps = [ ":opengl_wrapper_unit_test" ]
23}
24
25ohos_unittest("opengl_wrapper_unit_test") {
26  module_out_path = module_out_path
27
28  public_configs = [ ":opengl_wrapper_public_config" ]
29
30  sources = [
31    "egl_blob_test.cpp",
32    "egl_bundle_mgr_helper_test.cpp",
33    "egl_core_test.cpp",
34    "egl_system_layers_manager_test.cpp",
35    "egl_wrapper_context_test.cpp",
36    "egl_wrapper_display_test.cpp",
37    "egl_wrapper_entry_test.cpp",
38    "egl_wrapper_layer_test.cpp",
39    "egl_wrapper_loader_test.cpp",
40    "thread_private_data_ctl_test.cpp",
41  ]
42
43  deps = [
44    "$graphic_2d_root/frameworks/opengl_wrapper:EGL",
45    "//third_party/googletest:gmock",
46    "//third_party/googletest:gtest_main",
47  ]
48
49  external_deps = [
50    "bundle_framework:appexecfwk_base",
51    "bundle_framework:appexecfwk_core",
52    "c_utils:utils",
53    "hilog:libhilog",
54  ]
55}
56
57config("opengl_wrapper_public_config") {
58  include_dirs = [
59    "$graphic_2d_root/frameworks/opengl_wrapper/src",
60    "$graphic_2d_root/frameworks/opengl_wrapper/src/EGL",
61  ]
62
63  cflags = [
64    "-Wall",
65    "-Werror",
66    "-g3",
67    "-Dprivate=public",
68    "-Dprotected=public",
69  ]
70}
71