1# Copyright (c) 2021 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("//foundation/communication/netmanager_ext/netmanager_ext_config.gni") 16 17ohos_unittest("ethernet_manager_test") { 18 module_out_path = "netmanager_ext/ethernet_manager_test" 19 20 sources = [ 21 "dev_interface_state_test.cpp", 22 "ethernet_configuration_test.cpp", 23 "ethernet_manager_test.cpp", 24 "ethernet_service_proxy_test.cpp", 25 "ethernet_service_test.cpp", 26 ] 27 28 include_dirs = [ 29 "$EXT_INNERKITS_ROOT/include", 30 "$EXT_INNERKITS_ROOT/ethernetclient/include", 31 "$EXT_INNERKITS_ROOT/ethernetclient/include/proxy", 32 "$ETHERNETMANAGER_SOURCE_DIR/include", 33 "$BASE_INNERKITS_ROOT/netconnclient/include", 34 "$ETHERNETMANAGER_SOURCE_DIR/include/stub", 35 "$BASE_INNERKITS_ROOT/netconnclient/include", 36 "$DHCP_MANAGER_ROOT/services/mgr_service/include", 37 "$DHCP_MANAGER_ROOT/interfaces/inner_api/include", 38 "$DHCP_MANAGER_ROOT/interfaces/inner_api/interfaces", 39 "$NETSYSCONTROLLER_ROOT_DIR/include", 40 "$NETCONNMANAGER_COMMON_DIR/include", 41 ] 42 43 deps = [ 44 "$BASE_INNERKITS_ROOT/netconnclient:net_conn_parcel", 45 "$DHCP_MANAGER_ROOT/services/mgr_service:dhcp_manager_service", 46 "$ETHERNETMANAGER_SOURCE_DIR:ethernet_manager", 47 "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_manager_if", 48 "$NETCONNMANAGER_COMMON_DIR:net_service_common", 49 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 50 "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller", 51 ] 52 53 external_deps = [ 54 "access_token:libaccesstoken_sdk", 55 "access_token:libnativetoken", 56 "access_token:libtoken_setproc", 57 "ipc:ipc_core", 58 ] 59 60 defines = [ 61 "NETMGR_LOG_TAG = \"EthernetManager\"", 62 "LOG_DOMAIN = 0xD0015B0", 63 ] 64 65 if (enable_netmgr_ext_debug) { 66 defines += [ "NETMGR_DEBUG" ] 67 } 68 69 external_deps += [ "hilog:libhilog" ] 70 71 part_name = "netmanager_ext" 72 subsystem_name = "communication" 73} 74 75group("unittest") { 76 testonly = true 77 deps = [ ":ethernet_manager_test" ] 78} 79