!93 修复软总线用例

Merge pull request !93 from 张攀/master
This commit is contained in:
openharmony_ci 2022-08-18 06:42:48 +00:00 committed by Gitee
commit 11666ba31e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 15 additions and 2 deletions

5
communication/softbus_standard/common/wifi_utils.cpp Normal file → Executable file
View File

@ -118,14 +118,15 @@ int WiFiUtils::ConnectTo(const std::string& ssid, const std::string& passwd)
deviceConfig.preSharedKey = passwd;
deviceConfig.keyMgmt = "WPA-PSK";
int netId;
int ret = wifiDevicePtr->AddDeviceConfig(deviceConfig, netId);
bool isCandidate = false;
int ret = wifiDevicePtr->AddDeviceConfig(deviceConfig, netId, isCandidate);
if (ret != SOFTBUS_OK) {
LOG("[wifi]call AddDeviceConfig fail, ret:%d", ret);
} else {
LOG("[wifi]call AddDeviceConfig success, netId:%d", netId);
}
ret = wifiDevicePtr->ConnectToNetwork(netId);
ret = wifiDevicePtr->ConnectToNetwork(netId, isCandidate);
if (ret != SOFTBUS_OK) {
LOG("[wifi]call ConnectTo fail, ret:%d", ret);
return SOFTBUS_ERR;

View File

@ -51,4 +51,6 @@ ohos_moduletest_suite("dsoftbusTest") {
"//third_party/googletest:gtest_main",
]
external_deps = [ "dsoftbus:softbus_client" ]
subsystem_name = "communication"
part_name = "dsoftbus"
}

View File

@ -51,4 +51,6 @@ ohos_moduletest_suite("DctsSoftBusTransReliabilityTest") {
"//third_party/googletest:gtest_main",
]
external_deps = [ "dsoftbus:softbus_client" ]
subsystem_name = "communication"
part_name = "dsoftbus"
}

View File

@ -51,4 +51,6 @@ ohos_moduletest_suite("DctsSoftBusTransFileFunTest") {
"//third_party/googletest:gtest_main",
]
external_deps = [ "dsoftbus:softbus_client" ]
subsystem_name = "communication"
part_name = "dsoftbus"
}

View File

@ -50,4 +50,6 @@ ohos_moduletest_suite("DctsSoftBusTransFunTest") {
"//third_party/googletest:gtest_main",
]
external_deps = [ "dsoftbus:softbus_client" ]
subsystem_name = "communication"
part_name = "dsoftbus"
}

View File

@ -51,4 +51,6 @@ ohos_moduletest_suite("DctsSoftBusTransStreamFunTest") {
"//third_party/googletest:gtest_main",
]
external_deps = [ "dsoftbus:softbus_client" ]
subsystem_name = "communication"
part_name = "dsoftbus"
}

View File

@ -50,4 +50,6 @@ ohos_moduletest_suite("DctsSoftBusTransSessionFunTest") {
"//third_party/googletest:gtest_main",
]
external_deps = [ "dsoftbus:softbus_client" ]
subsystem_name = "communication"
part_name = "dsoftbus"
}