mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:16:51 +02: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) {
|
if (!_adbInterface) {
|
||||||
_adbInterface = new AdbInterface();
|
_adbInterface = new AdbInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get list of devices
|
||||||
QString devicesFullFilename{ _workingFolder + "/devices.txt" };
|
QString devicesFullFilename{ _workingFolder + "/devices.txt" };
|
||||||
QString command = _adbInterface->getAdbCommand() + " devices -l > " + devicesFullFilename;
|
QString command = _adbInterface->getAdbCommand() + " devices -l > " + devicesFullFilename;
|
||||||
appendLog(command);
|
appendLog(command);
|
||||||
system(command.toStdString().c_str());
|
system(command.toStdString().c_str());
|
||||||
|
|
||||||
if (!QFile::exists(devicesFullFilename)) {
|
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);
|
exit (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue