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/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 "//foundation/graphic/graphic_2d/rosen/modules/render_service_base/include", 63 ] 64} 65 66ohos_static_library("utils_unittest_common") { 67 visibility = [ ":*" ] 68 testonly = true 69 70 public_configs = [ 71 ":utils_unittest_common_public_config", 72 "../../../resources/config/build:coverage_flags", 73 "../../../resources/config/build:testcase_flags", 74 ] 75 76 public_deps = [ 77 "../..:libsnapshot_util", 78 "../../../dm:libdm", 79 "../../../test/common/utils:libtestutil", 80 "../../../utils:libwmutil", 81 "../../../utils:libwmutil_base", 82 "//commonlibrary/c_utils/base:utils", 83 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics", 84 "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base", 85 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 86 "//third_party/googletest:gmock", 87 "//third_party/googletest:gtest_main", 88 ] 89 90 external_deps = [ 91 "access_token:libaccesstoken_sdk", 92 "access_token:libnativetoken", 93 "access_token:libtoken_setproc", 94 "c_utils:utils", 95 "hilog:libhilog", 96 "ipc:ipc_single", 97 ] 98 99 subsystem_name = "window" 100 part_name = "window_manager" 101} 102## Build utils_unittest_common.a }}} 103