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_source_service_test" 20 21config("module_private_config") { 22 visibility = [ ":*" ] 23 include_dirs = [ 24 "./include", 25 "./include/callback", 26 "${common_path}/include", 27 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_sink/include", 28 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_source/include", 29 "${interfaces_path}/innerkits/native_cpp/screen_source/include", 30 "${interfaces_path}/innerkits/native_cpp/screen_source/include/callback", 31 "${services_path}/common/utils/include", 32 "${services_path}/screenservice/sourceservice/dscreenmgr", 33 "${services_path}/screenservice/sourceservice/dscreenservice/include", 34 "${services_path}/screenservice/sourceservice/dscreenservice/include/callback", 35 "${services_path}/screentransport/screensourcetrans/include", 36 ] 37} 38 39## UnitTest DScreenSourceStubTest 40ohos_unittest("DScreenSourceStubTest") { 41 sanitize = { 42 cfi = true 43 cfi_cross_dso = true 44 debug = false 45 } 46 module_out_path = module_out_path 47 48 sources = [ 49 "${services_path}/screenservice/test/unittest/sourceservice/dscreenservice/src/callback/dscreen_source_callback_stub_test.cpp", 50 "${services_path}/screenservice/test/unittest/sourceservice/dscreenservice/src/dscreen_source_service_test.cpp", 51 "${services_path}/screenservice/test/unittest/sourceservice/dscreenservice/src/dscreen_source_stub_test.cpp", 52 ] 53 54 configs = [ 55 ":module_private_config", 56 "${common_path}/test/unittest/resource:dscreen_unittest_public_config", 57 ] 58 59 deps = [ 60 "${common_path}:distributed_screen_utils", 61 "${interfaces_path}/innerkits/native_cpp/screen_sink:distributed_screen_sink_sdk", 62 "${interfaces_path}/innerkits/native_cpp/screen_source:distributed_screen_source_sdk", 63 "${services_path}/screenservice/sourceservice:distributed_screen_source", 64 "${services_path}/screentransport/screensourcetrans:distributed_screen_sourcetrans", 65 ] 66 67 external_deps = [ 68 "access_token:libaccesstoken_sdk", 69 "cJSON:cjson", 70 "c_utils:utils", 71 "distributed_hardware_fwk:distributed_av_receiver", 72 "distributed_hardware_fwk:distributedhardwareutils", 73 "distributed_hardware_fwk:libdhfwk_sdk", 74 "googletest:gmock", 75 "googletest:gtest_main", 76 "graphic_2d:librender_service_client", 77 "graphic_surface:surface", 78 "hilog:libhilog", 79 "ipc:ipc_core", 80 "json:nlohmann_json_static", 81 "safwk:system_ability_fwk", 82 "samgr:samgr_proxy", 83 "window_manager:libdm", 84 ] 85} 86