• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/lite/config/component/lite_component.gni")
15import("//build/test.gni")
16import("../../../../../dsoftbus.gni")
17
18module_output_path = "dsoftbus/transmission"
19if (defined(ohos_lite)) {
20  # L0
21  static_library("auth_session_test") {
22    sources = [ "auth_session_test.c" ]
23    include_dirs = [
24      "$dsoftbus_root_path/core/common/include",
25      "$dsoftbus_root_path/core/frame/common/include",
26      "//foundation/communication/wifi_lite/interfaces/wifiservice",
27    ]
28    deps = [ "$dsoftbus_root_path/sdk:softbus_client" ]
29    cflags = [
30      "-Wall",
31      "-fPIC",
32      "-std=c99",
33    ]
34    ldflags = [ "-fPIC" ]
35  }
36} else {
37  # L2
38  ohos_executable("auth_session_test") {
39    install_enable = true
40    sources = [ "auth_session_test.c" ]
41
42    include_dirs = [
43      "$dsoftbus_root_path/core/common/include",
44      "$dsoftbus_root_path/interfaces/inner_kits/transport",
45      "$dsoftbus_root_path/core/frame/common/include",
46
47      #"//foundation/communication/wifi_lite/interfaces/wifiservice",
48    ]
49
50    deps = [
51      "$dsoftbus_root_path/adapter:softbus_adapter",
52      "$dsoftbus_root_path/core/common:softbus_utils",
53      "$dsoftbus_root_path/sdk:softbus_client",
54    ]
55
56    if (is_standard_system) {
57      external_deps = [ "hilog:libhilog" ]
58      part_name = "dsoftbus"
59    }
60    subsystem_name = "communication"
61  }
62}
63
64ohos_unittest("TransClientSdkAuthManagerTest") {
65  module_out_path = module_output_path
66  sources = [ "trans_sdk_auth_manager_test.cpp" ]
67
68  include_dirs = [
69    "$dsoftbus_root_path/adapter/common/include",
70    "$dsoftbus_root_path/core/common/include",
71    "$dsoftbus_root_path/sdk/transmission/ipc/include",
72    "$dsoftbus_root_path/sdk/transmission/session/include",
73    "$dsoftbus_root_path/sdk/transmission/trans_channel/auth/include",
74    "$dsoftbus_root_path/sdk/transmission/trans_channel/auth/src",
75  ]
76
77  deps = [
78    "$dsoftbus_root_path/core/common:softbus_utils",
79    "$dsoftbus_root_path/core/frame:softbus_server",
80    "//third_party/googletest:gtest_main",
81  ]
82
83  if (is_standard_system) {
84    external_deps = [
85      "c_utils:utils",
86      "hilog:libhilog",
87    ]
88  } else {
89    external_deps = [
90      "c_utils:utils",
91      "hilog:libhilog",
92    ]
93  }
94}
95
96group("unittest") {
97  testonly = true
98  deps = [ ":TransClientSdkAuthManagerTest" ]
99}
100