1# Copyright (c) 2022-2024 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 "./include", 24 "${common_path}/include", 25 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_sink/include", 26 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_sink/include/callback", 27 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_source/include", 28 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_source/include/callback", 29 "${services_path}/common/databuffer/include", 30 "${services_path}/common/decision_center/include", 31 "${services_path}/common/imageJpeg/include", 32 "${services_path}/common/screen_channel/include", 33 "${services_path}/common/utils/include", 34 "${services_path}/screenservice/sourceservice/dscreenmgr/", 35 "${services_path}/screentransport/screensourceprocessor/encoder/include", 36 "${services_path}/screentransport/screensourceprocessor/include", 37 "${services_path}/screentransport/screensourcetrans/include", 38 "${services_path}/screenservice/sinkservice/screenregionmgr", 39 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr", 40 "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/engineutils/include", 41 ] 42} 43 44## UnitTest DscreenMgrTest 45ohos_unittest("DscreenMgrTest") { 46 sanitize = { 47 cfi = true 48 cfi_cross_dso = true 49 debug = false 50 } 51 module_out_path = module_out_path 52 53 sources = [ 54 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_manager_test.cpp", 55 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_test.cpp", 56 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp", 57 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/av_sender_engine_adapter_test.cpp", 58 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_manager_test.cpp", 59 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_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 "${distributedscreen_path}/common:distributed_screen_utils", 69 "${services_path}/screenservice/sourceservice:distributed_screen_source", 70 "${services_path}/screentransport/screensourcetrans:distributed_screen_sourcetrans", 71 ] 72 73 external_deps = [ 74 "access_token:libaccesstoken_sdk", 75 "access_token:libnativetoken_shared", 76 "access_token:libtokensetproc_shared", 77 "av_codec:av_codec_client", 78 "cJSON:cjson", 79 "c_utils:utils", 80 "distributed_hardware_fwk:distributed_av_sender", 81 "distributed_hardware_fwk:distributedhardwareutils", 82 "distributed_hardware_fwk:libdhfwk_sdk", 83 "dsoftbus:softbus_client", 84 "googletest:gmock", 85 "googletest:gtest_main", 86 "graphic_2d:libcomposer", 87 "graphic_2d:librender_service_client", 88 "graphic_surface:surface", 89 "graphic_surface:sync_fence", 90 "hdf_core:libhdi", 91 "hicollie:libhicollie", 92 "media_foundation:media_foundation", 93 "window_manager:libdm", 94 ] 95} 96