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("//arkcompiler/toolchain/test/test_helper.gni") 15import("//arkcompiler/toolchain/toolchain.gni") 16 17module_output_path = "arkcompiler/toolchain" 18 19host_unittest_action("WebSocketTest") { 20 module_out_path = module_output_path 21 22 include_dirs = [ "$toolchain_root/websocket" ] 23 24 sources = [ 25 # test file 26 "../../common/log_wrapper.cpp", 27 "frame_builder_test.cpp", 28 "http_decoder_test.cpp", 29 "web_socket_frame_test.cpp", 30 "websocket_test.cpp", 31 ] 32 33 configs = [ "$toolchain_root:toolchain_test_config" ] 34 35 deps = [ 36 "$toolchain_root/websocket:websocket_client", 37 "$toolchain_root/websocket:websocket_server", 38 sdk_libc_secshared_dep, 39 ] 40 41 if (is_arkui_x && target_os == "ios") { 42 deps += [ "$ark_third_party_root/openssl:libcrypto_static" ] 43 } else { 44 deps += [ "$ark_third_party_root/openssl:libcrypto_shared" ] 45 } 46 47 # hiviewdfx libraries 48 external_deps = hiviewdfx_ext_deps 49 deps += hiviewdfx_deps 50} 51 52group("unittest") { 53 testonly = true 54 55 # deps file 56 deps = [ ":WebSocketTest" ] 57} 58 59group("host_unittest") { 60 testonly = true 61 62 # deps file 63 deps = [ ":WebSocketTestAction" ] 64} 65