Working changes before merge.

This commit is contained in:
NissimHadar 2019-03-22 11:22:14 -07:00
parent 05618931b1
commit faf11480b6
4 changed files with 9 additions and 8 deletions

View file

@ -38,7 +38,7 @@ Nitpick::Nitpick(QWidget* parent) : QMainWindow(parent) {
_ui.plainTextEdit->setReadOnly(true); _ui.plainTextEdit->setReadOnly(true);
setWindowTitle("Nitpick - v3.1.3"); setWindowTitle("Nitpick - " + nitpickVersion);
clientProfiles << "VR-High" << "Desktop-High" << "Desktop-Low" << "Mobile-Touch" << "VR-Standalone"; clientProfiles << "VR-High" << "Desktop-High" << "Desktop-Low" << "Mobile-Touch" << "VR-Standalone";
_ui.clientProfileComboBox->insertItems(0, clientProfiles); _ui.clientProfileComboBox->insertItems(0, clientProfiles);

View file

@ -211,8 +211,6 @@ void TestRunnerMobile::runInterface() {
_adbInterface = new AdbInterface(); _adbInterface = new AdbInterface();
} }
sendServerIPToDevice();
_statusLabel->setText("Starting Interface"); _statusLabel->setText("Starting Interface");
QString testScript = (_runFullSuite->isChecked()) QString testScript = (_runFullSuite->isChecked())
@ -230,7 +228,7 @@ void TestRunnerMobile::runInterface() {
QString command = _adbInterface->getAdbCommand() + QString command = _adbInterface->getAdbCommand() +
" shell am start -n " + startCommand + " shell am start -n " + startCommand +
" --es args \\\"" + " --es args \\\"" +
" --url file:///~/serverless/tutorial.json" + " --url hifi://" + getServerIP() + "/0,0,0"
" --no-updater" + " --no-updater" +
" --no-login-suggestion" + " --no-login-suggestion" +
" --testScript " + testScript + " quitWhenFinished" + " --testScript " + testScript + " quitWhenFinished" +
@ -257,8 +255,8 @@ void TestRunnerMobile::pullFolder() {
#endif #endif
} }
void TestRunnerMobile::sendServerIPToDevice() { QString TestRunnerMobile::getServerIP() {
// Get device IP // Get device IP (ifconfig.txt was created when connecting)
QFile ifconfigFile{ _workingFolder + "/ifconfig.txt" }; QFile ifconfigFile{ _workingFolder + "/ifconfig.txt" };
if (!ifconfigFile.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!ifconfigFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__),
@ -309,7 +307,7 @@ void TestRunnerMobile::sendServerIPToDevice() {
if (!serverIP.isNull()) { if (!serverIP.isNull()) {
QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__),
"Cannot identify server IP (multiple interfaces on device submask)"); "Cannot identify server IP (multiple interfaces on device submask)");
return; return QString("CANNOT IDENTIFY SERVER IP");
} else { } else {
union { union {
uint32_t ip; uint32_t ip;
@ -325,6 +323,8 @@ void TestRunnerMobile::sendServerIPToDevice() {
} }
ifconfigFile.close(); ifconfigFile.close();
return serverIP;
} }
qint64 TestRunnerMobile::convertToBinary(const QString& str) { qint64 TestRunnerMobile::convertToBinary(const QString& str) {

View file

@ -52,7 +52,7 @@ public:
void pullFolder(); void pullFolder();
void sendServerIPToDevice(); QString getServerIP();
qint64 convertToBinary (const QString& str); qint64 convertToBinary (const QString& str);
private: private:

View file

@ -60,4 +60,5 @@ const double R_Y = 0.212655f;
const double G_Y = 0.715158f; const double G_Y = 0.715158f;
const double B_Y = 0.072187f; const double B_Y = 0.072187f;
const QString nitpickVersion{ "21660" };
#endif // hifi_common_h #endif // hifi_common_h