• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2025 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")
15import(
16    "//foundation/distributedhardware/distributed_screen/distributedscreen.gni")
17
18module_out_path =
19    "distributed_screen/distributed_screen/dscreen_sink_service_test"
20
21config("module_private_config") {
22  visibility = [ ":*" ]
23  include_dirs = [
24    "include",
25    "${interfaces_path}/innerkits/native_cpp/screen_sink/include",
26    "${interfaces_path}/innerkits/native_cpp/screen_sink/include/callback",
27    "${interfaces_path}/innerkits/native_cpp/screen_source/include",
28    "${interfaces_path}/innerkits/native_cpp/screen_source/include/callback",
29    "${common_path}/include",
30    "${services_path}/common/utils/include",
31    "${services_path}/common/databuffer/include",
32    "${services_path}/common/screen_channel/include",
33    "${services_path}/screentransport/screensinktrans/include",
34    "${services_path}/screentransport/screensinkprocessor/include",
35    "${services_path}/screentransport/screensinkprocessor/decoder/include",
36    "${services_path}/screenclient/include/",
37    "${services_path}/screenservice/sinkservice/screenregionmgr/",
38    "${services_path}/screenservice/sourceservice/dscreenmgr",
39    "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr",
40    "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/engineutils/include",
41  ]
42}
43
44## UnitTest DscreenRegionMgrTest
45ohos_unittest("DscreenRegionMgrTest") {
46  sanitize = {
47    blocklist = "${common_path}/test/unittest/resource/cfi_blocklist.txt"
48    cfi = true
49    cfi_cross_dso = true
50    debug = false
51  }
52  module_out_path = module_out_path
53
54  sources = [
55    "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregion_test.cpp",
56    "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregionmgr_test.cpp",
57    "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/2.0/src/av_receiver_engine_adapter_test.cpp",
58    "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/2.0/src/screenregion_test.cpp",
59    "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/2.0/src/screenregionmgr_test.cpp",
60  ]
61
62  configs = [
63    ":module_private_config",
64    "${common_path}/test/unittest/resource:dscreen_unittest_public_config",
65  ]
66
67  deps = [
68    "${services_path}/screenclient:distributed_screen_client",
69    "${services_path}/screenservice/sinkservice:distributed_screen_sink",
70    "${services_path}/screenservice/sourceservice:distributed_screen_source",
71    "${services_path}/screentransport/screensinktrans:distributed_screen_sinktrans",
72  ]
73
74  external_deps = [
75    "access_token:libaccesstoken_sdk",
76    "access_token:libnativetoken",
77    "access_token:libtoken_setproc",
78    "av_codec:av_codec_client",
79    "cJSON:cjson",
80    "cJSON:cjson_static",
81    "c_utils:utils",
82    "distributed_hardware_fwk:distributed_av_receiver",
83    "distributed_hardware_fwk:distributedhardwareutils",
84    "distributed_hardware_fwk:libdhfwk_sdk",
85    "googletest:gmock",
86    "googletest:gtest_main",
87    "graphic_2d:libcomposer",
88    "graphic_2d:libgraphic_utils",
89    "graphic_2d:librender_service_base",
90    "graphic_2d:librender_service_client",
91    "graphic_surface:surface",
92    "hilog:libhilog",
93    "hisysevent:libhisysevent",
94    "ipc:ipc_single",
95    "json:nlohmann_json_static",
96    "media_foundation:media_foundation",
97    "selinux_adapter:librestorecon",
98    "window_manager:libdm",
99  ]
100}
101