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/ohos.gni") 15import("//build/test.gni") 16import("//foundation/communication/netstack/netstack_config.gni") 17 18utils_include = [ 19 "$SUBSYSTEM_DIR/netstack/utils/common_utils/include", 20 "$SUBSYSTEM_DIR/netstack/utils/log/include", 21 "$SUBSYSTEM_DIR/netstack/utils/napi_utils/include", 22 "$THIRD_PARTY_ROOT/libwebsockets/include", 23] 24 25common_external_deps = [ 26 "hilog:libhilog", 27 "napi:ace_napi", 28] 29 30ohos_unittest("websocket_capi_unittest") { 31 module_out_path = "netstack/websocket_capi_unittest" 32 33 include_dirs = [ 34 "$NETSTACK_DIR/interfaces/kits/c/net_websocket/include", 35 "$NETSTACK_DIR/utils/log/include", 36 ] 37 include_dirs += utils_include 38 39 sources = [ "websocket_capi_unittest.cpp" ] 40 41 deps = [ "$NETSTACK_DIR/interfaces/kits/c/net_websocket:net_websocket" ] 42 43 external_deps = common_external_deps 44 45 part_name = "netstack" 46 subsystem_name = "communication" 47} 48 49group("unittest") { 50 testonly = true 51 deps = [ ":websocket_capi_unittest" ] 52} 53