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 "//third_party/json/include", 24 "${driver_path}/interfaces/include", 25 "${distributedhardwarefwk_path}/interfaces/inner_kits/include", 26 "${distributedhardwarefwk_path}/common/utils/include", 27 "${distributedhardwarefwk_path}/utils/include", 28 "${fwk_common_path}/utils/include", 29 "${mediastandard_path}/interfaces/inner_api/native", 30 ] 31 32 include_dirs += [ 33 "./include", 34 "${common_path}/include", 35 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_sink/include", 36 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_sink/include/callback", 37 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_source/include", 38 "${distributedscreen_path}/interfaces/innerkits/native_cpp/screen_source/include/callback", 39 "${services_path}/common/databuffer/include", 40 "${services_path}/common/decision_center/include", 41 "${services_path}/common/imageJpeg/include", 42 "${services_path}/common/screen_channel/include", 43 "${services_path}/common/utils/include", 44 "${services_path}/screenservice/sourceservice/dscreenmgr/", 45 "${services_path}/screentransport/screensourceprocessor/encoder/include", 46 "${services_path}/screentransport/screensourceprocessor/include", 47 "${services_path}/screentransport/screensourcetrans/include", 48 "${services_path}/screenservice/sinkservice/screenregionmgr", 49 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr", 50 "${services_path}/screenservice/test/unittest/sinkservice/screenregionmgr/engineutils/include", 51 ] 52} 53 54## UnitTest DscreenMgrTest 55ohos_unittest("DscreenMgrTest") { 56 module_out_path = module_out_path 57 58 sources = [ 59 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_manager_test.cpp", 60 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_test.cpp", 61 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp", 62 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/av_sender_engine_adapter_test.cpp", 63 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_manager_test.cpp", 64 "${services_path}/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_test.cpp", 65 ] 66 67 configs = [ ":module_private_config" ] 68 69 deps = [ 70 "${distributedscreen_path}/common:distributed_screen_utils", 71 "${services_path}/screenservice/sourceservice:distributed_screen_source", 72 "${services_path}/screentransport/screensourcetrans:distributed_screen_sourcetrans", 73 "//third_party/googletest:gmock", 74 "//third_party/googletest:gtest_main", 75 ] 76 77 external_deps = [ 78 "c_utils:utils", 79 "distributed_hardware_fwk:distributed_av_sender", 80 "distributed_hardware_fwk:distributedhardwareutils", 81 "distributed_hardware_fwk:libdhfwk_sdk", 82 "graphic_2d:libcomposer", 83 "graphic_2d:surface", 84 "graphic_2d:sync_fence", 85 "hdf_core:libhdi", 86 "player_framework:media_client", 87 "window_manager:libdm", 88 ] 89} 90