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 35ohos_unittest("snapshot_display_test") { 36 module_out_path = module_out_path 37 38 sources = [ "snapshot_display_test.cpp" ] 39 40 deps = [ ":utils_unittest_common" ] 41} 42 43## Build utils_unittest_common.a {{{ 44config("utils_unittest_common_public_config") { 45 include_dirs = [ 46 "//foundation/window/window_manager/dmserver/include", 47 "//foundation/window/window_manager/interfaces/innerkits/dm", 48 "//foundation/window/window_manager/interfaces/innerkits/wm", 49 "//foundation/window/window_manager/snapshot/include", 50 "//foundation/window/window_manager/test/common/utils/include", 51 "//foundation/window/window_manager/utils/include", 52 "//foundation/graphic/graphic_2d/rosen/modules/render_service_base/include", 53 ] 54} 55 56ohos_static_library("utils_unittest_common") { 57 visibility = [ ":*" ] 58 testonly = true 59 60 public_configs = [ 61 ":utils_unittest_common_public_config", 62 "//foundation/window/window_manager/resources/config/build:coverage_flags", 63 "//foundation/window/window_manager/resources/config/build:testcase_flags", 64 ] 65 66 public_deps = [ 67 "//commonlibrary/c_utils/base:utils", 68 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics", 69 "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base", 70 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 71 "//foundation/window/window_manager/dm:libdm", 72 "//foundation/window/window_manager/snapshot:libsnapshot_util", 73 "//foundation/window/window_manager/test/common/utils:libtestutil", 74 "//foundation/window/window_manager/utils:libwmutil", 75 "//third_party/googletest:gmock", 76 "//third_party/googletest:gtest_main", 77 ] 78 79 external_deps = [ 80 "access_token:libaccesstoken_sdk", 81 "access_token:libnativetoken", 82 "access_token:libtoken_setproc", 83 "hilog_native:libhilog", 84 "ipc:ipc_core", 85 ] 86 87 subsystem_name = "window" 88 part_name = "window_manager" 89} 90## Build utils_unittest_common.a }}} 91