1060ff233Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 2060ff233Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3060ff233Sopenharmony_ci# you may not use this file except in compliance with the License. 4060ff233Sopenharmony_ci# You may obtain a copy of the License at 5060ff233Sopenharmony_ci# 6060ff233Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7060ff233Sopenharmony_ci# 8060ff233Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9060ff233Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10060ff233Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11060ff233Sopenharmony_ci# See the License for the specific language governing permissions and 12060ff233Sopenharmony_ci# limitations under the License. 13060ff233Sopenharmony_ci 14060ff233Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 15060ff233Sopenharmony_ciimport("//build/test.gni") 16060ff233Sopenharmony_ciimport("../../../../../dsoftbus.gni") 17060ff233Sopenharmony_ci 18060ff233Sopenharmony_cimodule_output_path = "dsoftbus/transmission" 19060ff233Sopenharmony_cidsoftbus_root_path = "../../../../.." 20060ff233Sopenharmony_ci 21060ff233Sopenharmony_ciif (defined(ohos_lite)) { 22060ff233Sopenharmony_ci # L0 23060ff233Sopenharmony_ci static_library("auth_session_test") { 24060ff233Sopenharmony_ci sources = [ "auth_session_test.c" ] 25060ff233Sopenharmony_ci include_dirs = [ 26060ff233Sopenharmony_ci "$dsoftbus_root_path/core/common/include", 27060ff233Sopenharmony_ci "$dsoftbus_root_path/core/frame/common/include", 28060ff233Sopenharmony_ci "//foundation/communication/wifi_lite/interfaces/wifiservice", 29060ff233Sopenharmony_ci ] 30060ff233Sopenharmony_ci deps = [ "$dsoftbus_root_path/tests/sdk:softbus_client_static" ] 31060ff233Sopenharmony_ci cflags = [ 32060ff233Sopenharmony_ci "-Wall", 33060ff233Sopenharmony_ci "-fPIC", 34060ff233Sopenharmony_ci "-std=c99", 35060ff233Sopenharmony_ci ] 36060ff233Sopenharmony_ci ldflags = [ "-fPIC" ] 37060ff233Sopenharmony_ci } 38060ff233Sopenharmony_ci} else { 39060ff233Sopenharmony_ci # L2 40060ff233Sopenharmony_ci ohos_executable("auth_session_test") { 41060ff233Sopenharmony_ci sanitize = { 42060ff233Sopenharmony_ci cfi = true 43060ff233Sopenharmony_ci cfi_cross_dso = true 44060ff233Sopenharmony_ci debug = false 45060ff233Sopenharmony_ci } 46060ff233Sopenharmony_ci branch_protector_ret = "pac_ret" 47060ff233Sopenharmony_ci 48060ff233Sopenharmony_ci install_enable = true 49060ff233Sopenharmony_ci sources = [ "auth_session_test.c" ] 50060ff233Sopenharmony_ci 51060ff233Sopenharmony_ci include_dirs = [ 52060ff233Sopenharmony_ci "$dsoftbus_root_path/core/common/include", 53060ff233Sopenharmony_ci "$dsoftbus_root_path/interfaces/inner_kits/transport", 54060ff233Sopenharmony_ci "$dsoftbus_root_path/core/frame/common/include", 55060ff233Sopenharmony_ci 56060ff233Sopenharmony_ci #"//foundation/communication/wifi_lite/interfaces/wifiservice", 57060ff233Sopenharmony_ci ] 58060ff233Sopenharmony_ci 59060ff233Sopenharmony_ci deps = [ 60060ff233Sopenharmony_ci "$dsoftbus_root_path/adapter:softbus_adapter", 61060ff233Sopenharmony_ci "$dsoftbus_root_path/core/common:softbus_utils", 62060ff233Sopenharmony_ci "$dsoftbus_root_path/tests/sdk:softbus_client_static", 63060ff233Sopenharmony_ci ] 64060ff233Sopenharmony_ci 65060ff233Sopenharmony_ci if (is_standard_system) { 66060ff233Sopenharmony_ci external_deps = [ "hilog:libhilog" ] 67060ff233Sopenharmony_ci part_name = "dsoftbus" 68060ff233Sopenharmony_ci } 69060ff233Sopenharmony_ci subsystem_name = "communication" 70060ff233Sopenharmony_ci } 71060ff233Sopenharmony_ci} 72060ff233Sopenharmony_ci 73060ff233Sopenharmony_ciohos_unittest("TransClientSdkAuthManagerTest") { 74060ff233Sopenharmony_ci module_out_path = module_output_path 75060ff233Sopenharmony_ci sources = [ "trans_sdk_auth_manager_test.cpp" ] 76060ff233Sopenharmony_ci 77060ff233Sopenharmony_ci include_dirs = [ 78060ff233Sopenharmony_ci "$dsoftbus_root_path/adapter/common/include", 79060ff233Sopenharmony_ci "$dsoftbus_root_path/core/common/include", 80060ff233Sopenharmony_ci "$dsoftbus_root_path/sdk/transmission/ipc/include", 81060ff233Sopenharmony_ci "$dsoftbus_root_path/sdk/transmission/session/include", 82060ff233Sopenharmony_ci "$dsoftbus_root_path/sdk/transmission/trans_channel/auth/include", 83060ff233Sopenharmony_ci "$dsoftbus_root_path/sdk/transmission/trans_channel/auth/src", 84060ff233Sopenharmony_ci ] 85060ff233Sopenharmony_ci 86060ff233Sopenharmony_ci deps = [ 87060ff233Sopenharmony_ci "$dsoftbus_root_path/core/common:softbus_utils", 88060ff233Sopenharmony_ci "$dsoftbus_root_path/core/frame:softbus_server", 89060ff233Sopenharmony_ci ] 90060ff233Sopenharmony_ci 91060ff233Sopenharmony_ci if (is_standard_system) { 92060ff233Sopenharmony_ci external_deps = [ 93060ff233Sopenharmony_ci "c_utils:utils", 94060ff233Sopenharmony_ci "hilog:libhilog", 95060ff233Sopenharmony_ci ] 96060ff233Sopenharmony_ci } else { 97060ff233Sopenharmony_ci external_deps = [ 98060ff233Sopenharmony_ci "c_utils:utils", 99060ff233Sopenharmony_ci "hilog:libhilog", 100060ff233Sopenharmony_ci ] 101060ff233Sopenharmony_ci } 102060ff233Sopenharmony_ci} 103060ff233Sopenharmony_ci 104060ff233Sopenharmony_cigroup("unittest") { 105060ff233Sopenharmony_ci testonly = true 106060ff233Sopenharmony_ci deps = [ ":TransClientSdkAuthManagerTest" ] 107060ff233Sopenharmony_ci} 108