mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Store device ifconfig results in ifconfig.txt.
This commit is contained in:
parent
ddd411e113
commit
748a80fed7
1 changed files with 14 additions and 2 deletions
|
@ -67,14 +67,26 @@ void TestRunnerMobile::connectDevice() {
|
|||
if (!_adbInterface) {
|
||||
_adbInterface = new AdbInterface();
|
||||
}
|
||||
|
||||
|
||||
// Get list of devices
|
||||
QString devicesFullFilename{ _workingFolder + "/devices.txt" };
|
||||
QString command = _adbInterface->getAdbCommand() + " devices -l > " + devicesFullFilename;
|
||||
appendLog(command);
|
||||
system(command.toStdString().c_str());
|
||||
|
||||
if (!QFile::exists(devicesFullFilename)) {
|
||||
QMessageBox::critical(0, "Internal error", "devicesFullFilename not found");
|
||||
QMessageBox::critical(0, "Internal error", "devices.txt not found");
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
// Get device IP address
|
||||
QString ifconfigFullFilename{ _workingFolder + "/ifconfig.txt" };
|
||||
command = _adbInterface->getAdbCommand() + " shell ifconfig > " + ifconfigFullFilename;
|
||||
appendLog(command);
|
||||
system(command.toStdString().c_str());
|
||||
|
||||
if (!QFile::exists(ifconfigFullFilename)) {
|
||||
QMessageBox::critical(0, "Internal error", "ifconfig.txt not found");
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue