1# Copyright (c) 2024 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("InspectorConnectTest") {
20  module_out_path = module_output_path
21
22  include_dirs = [ "$toolchain_root/inspector" ]
23
24  sources = [
25    # test file
26    "connect_server_test.cpp",
27  ]
28
29  configs = [ "$toolchain_root:toolchain_test_config" ]
30
31  deps = [
32    "$toolchain_root/inspector:connectserver_debugger",
33    "$toolchain_root/websocket:websocket_client",
34    "$toolchain_root/websocket:websocket_server",
35  ]
36
37  # hiviewdfx libraries
38  external_deps = hiviewdfx_ext_deps
39  if (is_arkui_x && target_os == "ios") {
40    external_deps += [ "openssl:libcrypto_static" ]
41  } else {
42    external_deps += [ "openssl:libcrypto_shared" ]
43  }
44
45  external_deps += [ "bounds_checking_function:libsec_shared" ]
46  deps += hiviewdfx_deps
47}
48
49group("unittest") {
50  testonly = true
51
52  # deps file
53  deps = [ ":InspectorConnectTest" ]
54
55  if (is_mac) {
56    deps -= [ ":InspectorConnectTest" ]
57  }
58}
59
60group("host_unittest") {
61  testonly = true
62
63  # deps file
64  deps = [ ":InspectorConnectTestAction" ]
65
66  if (is_mac) {
67    deps -= [ ":InspectorConnectTestAction" ]
68  }
69}
70