1f857971dSopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd. 2f857971dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3f857971dSopenharmony_ci# you may not use this file except in compliance with the License. 4f857971dSopenharmony_ci# You may obtain a copy of the License at 5f857971dSopenharmony_ci# 6f857971dSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7f857971dSopenharmony_ci# 8f857971dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9f857971dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10f857971dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11f857971dSopenharmony_ci# See the License for the specific language governing permissions and 12f857971dSopenharmony_ci# limitations under the License. 13f857971dSopenharmony_ci 14f857971dSopenharmony_ciimport("//build/test.gni") 15f857971dSopenharmony_ciimport("../../../../device_status.gni") 16f857971dSopenharmony_ci 17f857971dSopenharmony_cimodule_output_path = "${device_status_part_name}/unit_out" 18f857971dSopenharmony_ci 19f857971dSopenharmony_ciconfig("module_private_config") { 20f857971dSopenharmony_ci visibility = [ ":*" ] 21f857971dSopenharmony_ci 22f857971dSopenharmony_ci include_dirs = [ 23f857971dSopenharmony_ci "include", 24f857971dSopenharmony_ci 25f857971dSopenharmony_ci #"${device_status_root_path}/libs/interface", 26f857971dSopenharmony_ci #"${device_status_root_path}/interfaces/innerkits/interaction/include", 27f857971dSopenharmony_ci #"${device_status_service_path}/delegate_task/include", 28f857971dSopenharmony_ci #"${device_status_service_path}/communication/service/include", 29f857971dSopenharmony_ci #"${device_status_service_path}/interaction/drag/src/include", 30f857971dSopenharmony_ci #"${device_status_service_path}/device_manager/include", 31f857971dSopenharmony_ci "${device_status_utils_path}/include", 32f857971dSopenharmony_ci ] 33f857971dSopenharmony_ci} 34f857971dSopenharmony_ci 35f857971dSopenharmony_ciohos_unittest("EpollManagerTest") { 36f857971dSopenharmony_ci sanitize = { 37f857971dSopenharmony_ci cfi = true 38f857971dSopenharmony_ci cfi_cross_dso = true 39f857971dSopenharmony_ci debug = false 40f857971dSopenharmony_ci blocklist = "./../../ipc_blocklist.txt" 41f857971dSopenharmony_ci } 42f857971dSopenharmony_ci 43f857971dSopenharmony_ci module_out_path = module_output_path 44f857971dSopenharmony_ci include_dirs = [ "${device_status_interfaces_path}/innerkits/include" ] 45f857971dSopenharmony_ci 46f857971dSopenharmony_ci sources = [ "src/epoll_manager_test.cpp" ] 47f857971dSopenharmony_ci 48f857971dSopenharmony_ci configs = [ 49f857971dSopenharmony_ci "${device_status_service_path}/interaction/drag:interaction_drag_public_config", 50f857971dSopenharmony_ci ":module_private_config", 51f857971dSopenharmony_ci ] 52f857971dSopenharmony_ci 53f857971dSopenharmony_ci deps = [ 54f857971dSopenharmony_ci "${device_status_root_path}/intention/common/epoll:intention_epoll", 55f857971dSopenharmony_ci "${device_status_root_path}/utils/common:devicestatus_util", 56f857971dSopenharmony_ci "${device_status_utils_path}:devicestatus_util", 57f857971dSopenharmony_ci ] 58f857971dSopenharmony_ci 59f857971dSopenharmony_ci external_deps = [ 60f857971dSopenharmony_ci "c_utils:utils", 61f857971dSopenharmony_ci "googletest:gtest_main", 62f857971dSopenharmony_ci "hilog:libhilog", 63f857971dSopenharmony_ci ] 64f857971dSopenharmony_ci} 65f857971dSopenharmony_ci 66f857971dSopenharmony_ciohos_unittest("ChannelTest") { 67f857971dSopenharmony_ci module_out_path = "${device_status_part_name}/devicestatussrv" 68f857971dSopenharmony_ci 69f857971dSopenharmony_ci sources = [ "src/channel_test.cpp" ] 70f857971dSopenharmony_ci 71f857971dSopenharmony_ci cflags = [ "-Dprivate=public" ] 72f857971dSopenharmony_ci 73f857971dSopenharmony_ci deps = [ 74f857971dSopenharmony_ci "${device_status_root_path}/intention/common/channel:intention_channel", 75f857971dSopenharmony_ci "${device_status_utils_path}:devicestatus_util", 76f857971dSopenharmony_ci ] 77f857971dSopenharmony_ci 78f857971dSopenharmony_ci external_deps = [ 79f857971dSopenharmony_ci "c_utils:utils", 80f857971dSopenharmony_ci "hilog:libhilog", 81f857971dSopenharmony_ci ] 82f857971dSopenharmony_ci} 83f857971dSopenharmony_ci 84f857971dSopenharmony_cigroup("unittest") { 85f857971dSopenharmony_ci testonly = true 86f857971dSopenharmony_ci deps = [ 87f857971dSopenharmony_ci ":ChannelTest", 88f857971dSopenharmony_ci ":EpollManagerTest", 89f857971dSopenharmony_ci ] 90f857971dSopenharmony_ci} 91