1# Copyright (c) 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("//foundation/communication/netmanager_ext/netmanager_ext_config.gni") 16 17ohos_unittest("vpn_manager_test") { 18 sources = [ 19 "extended_vpn_ctl_test.cpp", 20 "net_vpn_impl_test.cpp", 21 "networkvpn_client_test.cpp", 22 "networkvpn_service_test.cpp", 23 ] 24 25 include_dirs = [ 26 "$BASE_INNERKITS_ROOT/netconnclient/include/proxy", 27 "$EXT_INNERKITS_ROOT/include", 28 "$EXT_INNERKITS_ROOT/netvpnclient/include", 29 "$EXT_INNERKITS_ROOT/netvpnclient/include/ipc", 30 "$NETMANAGER_EXT_ROOT/services/vpnmanager/include", 31 "$NETMANAGER_EXT_ROOT/services/vpnmanager/include/ipc", 32 "$NETSYSCONTROLLER_ROOT_DIR/include", 33 ] 34 35 deps = [ 36 "$EXT_INNERKITS_ROOT/netvpnclient:net_vpn_manager_if", 37 "$NETMANAGER_EXT_ROOT/services/vpnmanager:net_vpn_manager_static", 38 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 39 ] 40 41 external_deps = [ 42 "access_token:libaccesstoken_sdk", 43 "access_token:libnativetoken", 44 "access_token:libtoken_setproc", 45 "bundle_framework:appexecfwk_base", 46 "bundle_framework:appexecfwk_core", 47 "eventhandler:libeventhandler", 48 "hilog:libhilog", 49 "ipc:ipc_core", 50 "netmanager_base:net_manager_common", 51 "os_account:os_account_innerkits", 52 ] 53 54 defines = [ 55 "NETMGR_LOG_TAG = \"NetworkVpnManager\"", 56 "LOG_DOMAIN = 0xD0015B0", 57 ] 58 59 if (enable_netmgr_ext_debug) { 60 defines += [ "NETMGR_DEBUG" ] 61 } 62 63 subsystem_name = "communication" 64 part_name = "netmanager_ext" 65 module_out_path = "netmanager_ext/vpn_manager_test" 66} 67 68group("unittest") { 69 testonly = true 70 deps = [ ":vpn_manager_test" ] 71} 72