1# Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development 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/ohos.gni") 15import("//build/test.gni") 16import("//foundation/CastEngine/castengine_wifi_display/config.gni") 17 18module_out_path = "sharing/impl" 19 20ohos_unittest("wfd_sink_session_test") { 21 module_out_path = module_out_path 22 23 include_dirs = [ 24 "$SHARING_ROOT_DIR/services", 25 "$SHARING_ROOT_DIR/services/agent/session", 26 "$SHARING_ROOT_DIR/services/common", 27 "$SHARING_ROOT_DIR/services/mediachannel", 28 "$SHARING_ROOT_DIR/services/network/interfaces", 29 "$SHARING_ROOT_DIR/services/mediaplayer/include", 30 "$SHARING_ROOT_DIR/services/impl/wfd", 31 "$SHARING_ROOT_DIR/services/impl/wfd/wfd_sink", 32 "$SHARING_ROOT_DIR/services/protocol", 33 "$SHARING_ROOT_DIR/services/protocol/frame", 34 "$SHARING_ROOT_DIR/services/protocol/rtp/include", 35 "./mock", 36 ] 37 38 sources = [ 39 "$SHARING_ROOT_DIR/services/impl/wfd/wfd_message.cpp", 40 "$SHARING_ROOT_DIR/services/impl/wfd/wfd_sink/wfd_sink_session.cpp", 41 "./mock/mock_wfd_sink_session.cpp", 42 "wfd_sink_session_test.cpp", 43 ] 44 45 deps = [ 46 "$SHARING_ROOT_DIR/services/agent:sharing_agent_srcs", 47 "$SHARING_ROOT_DIR/services/common:kv_operator", 48 "$SHARING_ROOT_DIR/services/common:sharing_common", 49 "$SHARING_ROOT_DIR/services/configuration:sharing_configure_srcs", 50 "$SHARING_ROOT_DIR/services/context:sharing_context_srcs", 51 "$SHARING_ROOT_DIR/services/event:sharing_event_srcs", 52 "$SHARING_ROOT_DIR/services/network:sharing_network", 53 "$SHARING_ROOT_DIR/services/protocol/rtp:sharing_rtp", 54 "$SHARING_ROOT_DIR/services/protocol/rtsp:sharing_rtsp", 55 "//third_party/googletest:gmock", 56 "//third_party/googletest:gtest_main", 57 ] 58 59 external_deps = [ 60 "av_codec:av_codec_client", 61 "c_utils:utils", 62 "c_utils:utilsbase", 63 "graphic_surface:surface", 64 "graphic_surface:sync_fence", 65 "hilog:libhilog", 66 "ipc:ipc_core", 67 "window_manager:libdm", 68 ] 69} 70 71ohos_unittest("wfd_source_session_test") { 72 module_out_path = module_out_path 73 74 include_dirs = [ 75 "$SHARING_ROOT_DIR/services", 76 "$SHARING_ROOT_DIR/services/agent/session", 77 "$SHARING_ROOT_DIR/services/common", 78 "$SHARING_ROOT_DIR/services/mediachannel", 79 "$SHARING_ROOT_DIR/services/network/interfaces", 80 "$SHARING_ROOT_DIR/services/mediaplayer/include", 81 "$SHARING_ROOT_DIR/services/impl/wfd", 82 "$SHARING_ROOT_DIR/services/impl/wfd/wfd_source", 83 "$SHARING_ROOT_DIR/services/protocol", 84 "$SHARING_ROOT_DIR/services/protocol/frame", 85 "$SHARING_ROOT_DIR/services/protocol/rtp/include", 86 "./mock", 87 ] 88 89 sources = [ 90 "$SHARING_ROOT_DIR/services/impl/wfd/wfd_message.cpp", 91 "$SHARING_ROOT_DIR/services/impl/wfd/wfd_source/wfd_source_session.cpp", 92 "./mock/mock_wfd_source_session.cpp", 93 "wfd_source_session_test.cpp", 94 ] 95 96 deps = [ 97 "$SHARING_ROOT_DIR/services/agent:sharing_agent_srcs", 98 "$SHARING_ROOT_DIR/services/common:kv_operator", 99 "$SHARING_ROOT_DIR/services/common:sharing_common", 100 "$SHARING_ROOT_DIR/services/configuration:sharing_configure_srcs", 101 "$SHARING_ROOT_DIR/services/context:sharing_context_srcs", 102 "$SHARING_ROOT_DIR/services/event:sharing_event_srcs", 103 "$SHARING_ROOT_DIR/services/network:sharing_network", 104 "$SHARING_ROOT_DIR/services/protocol/rtp:sharing_rtp", 105 "$SHARING_ROOT_DIR/services/protocol/rtsp:sharing_rtsp", 106 "//third_party/googletest:gmock", 107 "//third_party/googletest:gtest_main", 108 ] 109 110 external_deps = [ 111 "av_codec:av_codec_client", 112 "c_utils:utils", 113 "c_utils:utilsbase", 114 "graphic_surface:surface", 115 "graphic_surface:sync_fence", 116 "hilog:libhilog", 117 "ipc:ipc_core", 118 "window_manager:libdm", 119 ] 120} 121 122ohos_unittest("wfd_message_test") { 123 module_out_path = module_out_path 124 125 include_dirs = [ 126 "$SHARING_ROOT_DIR/services", 127 "$SHARING_ROOT_DIR/services/agent/session", 128 "$SHARING_ROOT_DIR/services/common", 129 "$SHARING_ROOT_DIR/services/impl/wfd", 130 "$SHARING_ROOT_DIR/services/protocol/rtp/include", 131 "./mock", 132 ] 133 134 sources = [ 135 "$SHARING_ROOT_DIR/services/impl/wfd/wfd_message.cpp", 136 "wfd_message_test.cpp", 137 ] 138 139 deps = [ 140 "$SHARING_ROOT_DIR/services/protocol/rtp:sharing_rtp", 141 "$SHARING_ROOT_DIR/services/protocol/rtsp:sharing_rtsp", 142 "//third_party/googletest:gmock", 143 "//third_party/googletest:gtest_main", 144 ] 145 146 external_deps = [ 147 "av_codec:av_codec_client", 148 "c_utils:utils", 149 "c_utils:utilsbase", 150 "graphic_surface:surface", 151 "graphic_surface:sync_fence", 152 "hilog:libhilog", 153 "ipc:ipc_core", 154 "window_manager:libdm", 155 ] 156} 157