• 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 = "window_manager/OH-DMS/snapshot"
17
18group("unittest") {
19  testonly = true
20
21  deps = [
22    ":snapshot_display_test",
23    ":snapshot_utils_test",
24  ]
25}
26
27ohos_unittest("snapshot_utils_test") {
28  module_out_path = module_out_path
29
30  sources = [ "snapshot_utils_test.cpp" ]
31
32  deps = [ ":utils_unittest_common" ]
33
34  external_deps = [
35    "c_utils:utils",
36    "hilog:libhilog",
37  ]
38}
39
40ohos_unittest("snapshot_display_test") {
41  module_out_path = module_out_path
42
43  sources = [ "snapshot_display_test.cpp" ]
44
45  deps = [ ":utils_unittest_common" ]
46
47  external_deps = [
48    "c_utils:utils",
49    "hilog:libhilog",
50  ]
51}
52
53## Build utils_unittest_common.a {{{
54config("utils_unittest_common_public_config") {
55  include_dirs = [
56    "../../../dmserver/include",
57    "../../../interfaces/innerkits/dm",
58    "../../../interfaces/innerkits/wm",
59    "../../include",
60    "../../../test/common/utils/include",
61    "../../../utils/include",
62  ]
63}
64
65ohos_static_library("utils_unittest_common") {
66  visibility = [ ":*" ]
67  testonly = true
68
69  public_configs = [
70    ":utils_unittest_common_public_config",
71    "../../../resources/config/build:coverage_flags",
72    "../../../resources/config/build:testcase_flags",
73  ]
74
75  public_deps = [
76    "../..:libsnapshot_util",
77    "../../../dm:libdm",
78    "../../../test/common/utils:libtestutil",
79    "../../../utils:libwmutil",
80    "../../../utils:libwmutil_base",
81  ]
82
83  public_external_deps = [
84    "c_utils:utils",
85    "googletest:gmock",
86    "googletest:gtest_main",
87    "graphic_2d:2d_graphics",
88    "graphic_2d:librender_service_base",
89    "graphic_2d:librender_service_client",
90    "image_framework:image_native",
91  ]
92
93  external_deps = [
94    "access_token:libaccesstoken_sdk",
95    "access_token:libnativetoken",
96    "access_token:libtoken_setproc",
97    "c_utils:utils",
98    "graphic_2d:librender_service_base",
99    "hilog:libhilog",
100    "ipc:ipc_single",
101  ]
102
103  subsystem_name = "window"
104  part_name = "window_manager"
105}
106## Build utils_unittest_common.a }}}
107