• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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 = "distributed_screen/DscreenMgrTest"
19
20config("module_private_config") {
21  visibility = [ ":*" ]
22  include_dirs = [
23    "${driver_path}/interfaces/include",
24    "${distributedhardwarefwk_path}/interfaces/inner_kits/include",
25    "${distributedhardwarefwk_path}/common/utils/include",
26    "${distributedhardwarefwk_path}/utils/include",
27    "${fwk_common_path}/utils/include",
28    "${mediastandard_path}/interfaces/inner_api/native",
29  ]
30
31  include_dirs += [
32    "./include",
33    "${common_path}/include",
34    "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_sink/include",
35    "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_sink/include/callback",
36    "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_source/include",
37    "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_source/include/callback",
38    "${services_path}/common/databuffer/include",
39    "${services_path}/common/decision_center/include",
40    "${services_path}/common/imageJpeg/include",
41    "${services_path}/common/screen_channel/include",
42    "${services_path}/common/utils/include",
43    "${services_path}/screenservice/sourceservice/dscreenmgr/",
44    "${services_path}/screentransport/screensourceprocessor/encoder/include",
45    "${services_path}/screentransport/screensourceprocessor/include",
46    "${services_path}/screentransport/screensourcetrans/include",
47    "${services_path}/screenservice/sinkservice/screenregionmgr",
48    "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr",
49    "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/engineutils/include",
50  ]
51}
52
53## UnitTest DscreenMgrTest
54ohos_unittest("DscreenMgrTest") {
55  sanitize = {
56    cfi = true
57    cfi_cross_dso = true
58    debug = false
59  }
60  module_out_path = module_out_path
61
62  sources = [
63    "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_manager_test.cpp",
64    "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_test.cpp",
65    "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp",
66    "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/av_sender_engine_adapter_test.cpp",
67    "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_manager_test.cpp",
68    "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_test.cpp",
69  ]
70
71  configs = [ ":module_private_config" ]
72
73  deps = [
74    "${distributedscreen_path}/common:distributed_screen_utils",
75    "${services_path}/screenservice/sourceservice:distributed_screen_source",
76    "${services_path}/screentransport/screensourcetrans:distributed_screen_sourcetrans",
77    "//third_party/googletest:gmock",
78    "//third_party/googletest:gtest_main",
79  ]
80
81  external_deps = [
82    "access_token:libaccesstoken_sdk",
83    "access_token:libnativetoken",
84    "access_token:libtoken_setproc",
85    "c_utils:utils",
86    "distributed_hardware_fwk:distributed_av_sender",
87    "distributed_hardware_fwk:distributedhardwareutils",
88    "distributed_hardware_fwk:libdhfwk_sdk",
89    "dsoftbus:softbus_client",
90    "graphic_2d:libcomposer",
91    "graphic_2d:librender_service_client",
92    "graphic_surface:surface",
93    "graphic_surface:sync_fence",
94    "hdf_core:libhdi",
95    "hicollie:libhicollie",
96    "player_framework:media_client",
97    "window_manager:libdm",
98  ]
99}
100