1# Copyright (c) 2021-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/dm" 17 18group("unittest") { 19 testonly = true 20 21 deps = [ 22 ":dm_display_change_unit_test", 23 ":dm_display_power_unit_test", 24 ":dm_screen_manager_test", 25 ":dm_screen_test", 26 ":dm_screenshot_test", 27 ":dm_snapshot_utils_test", 28 ] 29} 30 31## UnitTest dm_display_change_unit_test {{{ 32ohos_unittest("dm_display_change_unit_test") { 33 module_out_path = module_out_path 34 35 sources = [ "display_change_unit_test.cpp" ] 36 37 deps = [ ":dm_unittest_common" ] 38} 39 40## UnitTest dm_display_change_unit_test }}} 41 42## UnitTest dm_display_power_unit_test {{{ 43ohos_unittest("dm_display_power_unit_test") { 44 module_out_path = module_out_path 45 46 sources = [ "display_power_unit_test.cpp" ] 47 48 deps = [ ":dm_unittest_common" ] 49} 50 51## UnitTest dm_snapshot_utils_test }}} 52 53## UnitTest dm_snapshot_utils_test {{{ 54ohos_unittest("dm_snapshot_utils_test") { 55 module_out_path = module_out_path 56 57 sources = [ 58 "//foundation/windowmanager/snapshot/snapshot_utils.cpp", 59 "snapshot_utils_test.cpp", 60 ] 61 62 deps = [ ":dm_unittest_common" ] 63} 64 65## UnitTest dm_snapshot_utils_test }}} 66 67## UnitTest dm_screenshot_test {{{ 68ohos_unittest("dm_screenshot_test") { 69 module_out_path = module_out_path 70 71 sources = [ "screenshot_test.cpp" ] 72 73 deps = [ ":dm_unittest_common" ] 74} 75 76## UnitTest dm_screenshot_test }}} 77 78## UnitTest dm_screen_manager_test {{{ 79ohos_unittest("dm_screen_manager_test") { 80 module_out_path = module_out_path 81 82 sources = [ 83 "screen_manager_test.cpp", 84 "screen_manager_utils.cpp", 85 ] 86 87 deps = [ ":dm_unittest_common" ] 88} 89 90## UnitTest dm_screen_manager_test }}} 91 92## UnitTest dm_screen_test {{{ 93ohos_unittest("dm_screen_test") { 94 module_out_path = module_out_path 95 96 sources = [ 97 "screen_manager_utils.cpp", 98 "screen_test.cpp", 99 ] 100 101 deps = [ ":dm_unittest_common" ] 102} 103 104## UnitTest dm_screen_test }}} 105 106## Build dm_unittest_common.a {{{ 107config("dm_unittest_common_public_config") { 108 include_dirs = [ 109 "//foundation/windowmanager/dm/include", 110 "//foundation/windowmanager/dmserver/include", 111 "//foundation/windowmanager/snapshot", 112 "//foundation/windowmanager/interfaces/innerkits/dm", 113 "//foundation/windowmanager/utils/include", 114 "//foundation/graphic/standard/rosen/modules/render_service_client", # RSSurface 115 ] 116} 117 118ohos_static_library("dm_unittest_common") { 119 visibility = [ ":*" ] 120 testonly = true 121 122 public_configs = [ ":dm_unittest_common_public_config" ] 123 124 public_deps = [ 125 "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", 126 "//foundation/multimedia/image_standard/interfaces/innerkits:image_native", # PixelMap 127 "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client", 128 "//foundation/windowmanager/dm:libdm", 129 "//foundation/windowmanager/dmserver:libdms", 130 "//foundation/windowmanager/snapshot:snapshot_display", 131 "//foundation/windowmanager/utils:libwmutil", 132 "//foundation/windowmanager/wm:libwm", 133 "//foundation/windowmanager/wmserver:libwms", 134 "//third_party/googletest:gmock", 135 "//third_party/googletest:gtest_main", 136 "//third_party/libpng:libpng", # png 137 "//utils/native/base:utils", 138 ] 139 140 external_deps = [ 141 "hilog_native:libhilog", 142 "ipc:ipc_core", 143 ] 144 subsystem_name = "window" 145 part_name = "window_manager" 146} 147## Build wm_unittest_common.a }}} 148