# Copyright (c) 2021-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("../../../core/authentication/authentication.gni") import("../../../dsoftbus.gni") import("unittest/authmanager.gni") module_output_path = "dsoftbus/auth" ohos_unittest("AuthTest") { module_out_path = module_output_path sources = [ "unittest/auth_test.cpp" ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/frame/$os_type/init/include", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/core/transmission/trans_channel/manager/include", "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthEnhanceMockTest") { module_out_path = module_output_path sanitize = { cfi = true cfi_cross_dso = true debug = true } sources = [ "$dsoftbus_root_path/core/adapter/authentication/src/lnn_extdata_config_virtual.c", "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp", "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp", "$dsoftbus_root_path/core/authentication/bind/auth_device_profile_listener_virtual.cpp", "$dsoftbus_root_path/core/authentication/src/auth_common.c", "$dsoftbus_root_path/core/authentication/src/auth_connection.c", "$dsoftbus_root_path/core/authentication/src/auth_device.c", "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp", "$dsoftbus_root_path/core/authentication/src/auth_hichain.c", "$dsoftbus_root_path/core/authentication/src/auth_hichain_adapter.c", "$dsoftbus_root_path/core/authentication/src/auth_interface.c", "$dsoftbus_root_path/core/authentication/src/auth_lane.c", "$dsoftbus_root_path/core/authentication/src/auth_manager.c", "$dsoftbus_root_path/core/authentication/src/auth_normalize_request.c", "$dsoftbus_root_path/core/authentication/src/auth_request.c", "$dsoftbus_root_path/core/authentication/src/auth_session_fsm.c", "$dsoftbus_root_path/core/authentication/src/auth_session_json.c", "$dsoftbus_root_path/core/authentication/src/auth_session_key.c", "$dsoftbus_root_path/core/authentication/src/auth_session_message.c", "$dsoftbus_root_path/core/authentication/src/auth_tcp_connection.c", "$dsoftbus_root_path/core/authentication/src/virtual/auth_attest_virtual.c", "$dsoftbus_root_path/core/authentication/src/virtual/auth_device_common_key_virtual.c", "$dsoftbus_root_path/core/authentication/src/virtual/auth_hichain_system_ability_monitor_virtual.c", "$dsoftbus_root_path/core/authentication/src/virtual/auth_meta_manager_virtual.c", "$dsoftbus_root_path/core/authentication/src/virtual/customized_security_protocol_virtual.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_cipherkey_manager_virtual.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_device_info_recovery_virtual.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_ptk_info_virtual.c", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_feature_capability.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_compress_virtual.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_socket_mock.cpp", "unittest/auth_common_mock.cpp", "unittest/auth_net_ledger_mock.cpp", "unittest/auth_test_enhance.cpp", ] include_dirs = [ "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/dfx/interface/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/connection/p2p/interface", "$dsoftbus_root_path/core/connection/p2p/common/include", "$dsoftbus_root_path/core/frame/$os_type/init/include", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/inner_kits/lnn", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/adapter/authentication/include", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/connection/ble/include", "$dsoftbus_root_path/core/connection/wifi_direct_cpp", "$dsoftbus_root_path/core/transmission/trans_channel/manager/include", "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthTestCallBackTest") { module_out_path = module_output_path sources = [ "$dsoftbus_root_path/core/adapter/authentication/src/lnn_extdata_config_virtual.c", "$dsoftbus_root_path/core/authentication/src/auth_common.c", "$dsoftbus_root_path/core/authentication/src/auth_connection.c", "$dsoftbus_root_path/core/authentication/src/auth_device.c", "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp", "$dsoftbus_root_path/core/authentication/src/auth_hichain.c", "$dsoftbus_root_path/core/authentication/src/auth_hichain_adapter.c", "$dsoftbus_root_path/core/authentication/src/auth_interface.c", "$dsoftbus_root_path/core/authentication/src/auth_lane.c", "$dsoftbus_root_path/core/authentication/src/auth_manager.c", "$dsoftbus_root_path/core/authentication/src/auth_request.c", "$dsoftbus_root_path/core/authentication/src/auth_session_fsm.c", "$dsoftbus_root_path/core/authentication/src/auth_session_json.c", "$dsoftbus_root_path/core/authentication/src/auth_session_key.c", "$dsoftbus_root_path/core/authentication/src/auth_session_message.c", "$dsoftbus_root_path/core/authentication/src/auth_tcp_connection.c", "$dsoftbus_root_path/core/authentication/src/virtual/auth_device_common_key_virtual.c", "$dsoftbus_root_path/core/authentication/src/virtual/auth_meta_manager_virtual.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_cipherkey_manager_virtual.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_device_info_recovery_virtual.c", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_feature_capability.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_compress_virtual.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_socket_mock.cpp", "unittest/auth_common_mock.cpp", "unittest/auth_net_ledger_mock.cpp", "unittest/auth_test_mock.cpp", ] include_dirs = [ "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/connection/p2p/interface", "$dsoftbus_root_path/core/connection/p2p/common/include", "$dsoftbus_root_path/core/frame/$os_type/init/include", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/inner_kits/transport", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/adapter/authentication/include", "$dsoftbus_root_path/core/connection/ble/include", "$dsoftbus_root_path/core/connection/wifi_direct_cpp", "$dsoftbus_root_path/core/transmission/trans_channel/manager/include", "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthOtherTest") { module_out_path = module_output_path sources = [ "unittest/auth_other_test.cpp" ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/frame/$os_type/init/include", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/adapter/authentication/include", "$dsoftbus_root_path/core/connection/wifi_direct_cpp", "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthTcpConnectionTest") { module_out_path = module_output_path sources = [ "unittest/auth_tcp_connection_test.cpp" ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/frame/$os_type/init/include", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/transmission/trans_channel/manager/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthHichainTest") { module_out_path = module_output_path sources = [ "$dsoftbus_root_path/tests/core/authentication/unittest/auth_common_mock.cpp", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp", "unittest/auth_hichain_test.cpp", "unittest/auth_net_ledger_mock.cpp", ] include_dirs = [ "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/tests/core/authentication/unittest", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/frame/$os_type/init/include", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/interfaces/inner_kits/transport", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", "$dsoftbus_root_path/core/adapter/bus_center/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthSessionMessageTest") { module_out_path = module_output_path sources = [ "unittest/auth_session_message_test.cpp" ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/frame/$os_type/init/include", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/adapter/authentication/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthManagerTest") { module_out_path = module_output_path sources = auth_manager_source include_dirs = auth_manager_include deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthSessionFsmTest") { module_out_path = module_output_path sources = [ "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock/ble_mock.cpp", "unittest/auth_session_fsm_test.cpp", ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/frame/$os_type/init/include", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/adapter/authentication/include", "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock", "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface", "$dsoftbus_root_path/core/broadcast/common/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthSessionKeyTest") { module_out_path = module_output_path sources = [ "unittest/auth_session_key_test.cpp" ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/adapter/bus_center/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "c_utils:utils", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthNormalizeRequestTest") { module_out_path = module_output_path sources = [ "unittest/auth_normalize_request_test.cpp" ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/utils/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gtest_main", "hilog:libhilog", ] } } ohos_unittest("AuthLaneTest") { module_out_path = module_output_path sources = [ "unittest/auth_lane_mock.cpp", "unittest/auth_lane_test.cpp", ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/message_handler/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/frame/common/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/include/", "$dsoftbus_root_path/tests/sdk/common/include", "unittest/common/", "$dsoftbus_root_path/core/authentication/src", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/adapter/authentication/include", "$dsoftbus_root_path/core/connection/wifi_direct/utils", "$dsoftbus_root_path/core/connection/wifi_direct", "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", ] deps = [ "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", ] if (is_standard_system) { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "device_auth:deviceauth_sdk", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } else { external_deps = [ "bounds_checking_function:libsec_shared", "cJSON:cjson", "c_utils:utils", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] } } group("unittest") { testonly = true deps = [ ":AuthEnhanceMockTest", ":AuthHichainTest", ":AuthLaneTest", ":AuthManagerTest", ":AuthNormalizeRequestTest", ":AuthOtherTest", ":AuthSessionFsmTest", ":AuthSessionKeyTest", ":AuthSessionMessageTest", ":AuthTcpConnectionTest", ":AuthTest", ":AuthTestCallBackTest", ] } group("fuzztest") { testonly = true deps = [ "fuzztest:fuzztest" ] if (enhanced) { deps += [ "$dsoftbus_root_path/dsoftbus_enhance/test/core/authentication:fuzztest", ] } }