diff options
Diffstat (limited to 'libqsystemtest/qsystemtest.cpp')
-rw-r--r-- | libqsystemtest/qsystemtest.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libqsystemtest/qsystemtest.cpp b/libqsystemtest/qsystemtest.cpp index 7ae1ea3..945a6b2 100644 --- a/libqsystemtest/qsystemtest.cpp +++ b/libqsystemtest/qsystemtest.cpp @@ -2395,6 +2395,10 @@ void QSystemTest::startApplication( const QString &application, const QStringLis } else { // Running on device + + if (!device_control) + device_control = new Qt4Test::TestDeviceControl(ssh_param); + QProcess proc; if (!(flags & BackgroundCurrentApplication)) { @@ -2445,11 +2449,12 @@ void QSystemTest::startApplication( const QString &application, const QStringLis // testOutputPane()->append(reply); #endif - if (device_control) + if (device_control) { device_control->runCustomCommand("run-standalone.sh " + application + " -style qtuitest", 3000, reply); #ifdef QTCREATOR_QTEST testOutputPane()->append(reply); #endif + } if (!connectToAut(timeout)) { fail(QString("Could not connect to remote process '%1'.").arg(app)); @@ -2782,8 +2787,6 @@ void QSystemTest::expectApplicationClose( bool value ) */ void QSystemTest::processCommandLine( int &argc, char *argv[] ) { - qDebug() << "QSystemTest::processCommandLine()"; - int offset = 0; // Whenever we discover an option that 'we' understand, eat away the option (and its parameters) so that QTest doesn't get @@ -2828,8 +2831,7 @@ void QSystemTest::processCommandLine( int &argc, char *argv[] ) argv[i+1] = 0; ++offset; ++i; - - qDebug() << "authost=" << ssh_param.host; + ssh_param.timeout = 20000; } else if ( !strcasecmp(argv[i], "-username") ) { char *given_arg = argv[i]; @@ -2853,11 +2855,14 @@ void QSystemTest::processCommandLine( int &argc, char *argv[] ) qFatal("Expected a password after %s", given_arg); ssh_param.pwd = argv[i+1]; + ssh_param.authType = Core::SshConnectionParameters::AuthByPwd; argv[i+1] = 0; ++offset; ++i; - } else if ( !strcasecmp(argv[i], "-private-key-file") ) { + ssh_param.privateKeyFile = ""; + + } else if ( !strcasecmp(argv[i], "-private-key") ) { char *given_arg = argv[i]; argv[i] = 0; @@ -2866,6 +2871,8 @@ void QSystemTest::processCommandLine( int &argc, char *argv[] ) qFatal("Expected a private key file after %s", given_arg); ssh_param.privateKeyFile = argv[i+1]; + ssh_param.pwd = ""; + ssh_param.authType = Core::SshConnectionParameters::AuthByKey; argv[i+1] = 0; ++offset; ++i; |