diff options
Diffstat (limited to 'libqsystemtest/maemotestcontrol.cpp')
-rw-r--r-- | libqsystemtest/maemotestcontrol.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libqsystemtest/maemotestcontrol.cpp b/libqsystemtest/maemotestcontrol.cpp index 07e5079..074767d 100644 --- a/libqsystemtest/maemotestcontrol.cpp +++ b/libqsystemtest/maemotestcontrol.cpp @@ -3,6 +3,7 @@ #include <QTime> #include <QTimer> #include <QApplication> +#include <QDebug> namespace Core { class SshConnection; @@ -61,8 +62,19 @@ bool MaemoTestControl::startApplication( const QString &application, const QStri { Q_UNUSED(environment); Q_UNUSED(arguments); - QString cmd = "run-standalone.sh " + application; - if (styleQtUITest) cmd += " -style qtuitest"; + // for Maemo5 applications need to be run with run-standalone.sh + // however for Maemo6 we still need to set the variables + // in .profile eg DISPLAY=:0 + QString cmd = QString("( " + "if [ -x /usr/bin/run-standalone.sh ]; then " + "%1 /usr/bin/run-standalone.sh %2 %3; " + "else " + ". $HOME/.profile; " + "%1 %2 %3; " + "fi )") + .arg(environment.join(" ")) + .arg(application) + .arg(styleQtUITest?"-style qtuitest":""); runBlockingCommand( CustomCommand, cmd, 10000); reply = reply_txt; @@ -174,6 +186,7 @@ void MaemoTestControl::handleProcessFinished(int exitStatus) if (exitStatus != SshRemoteProcess::ExitedNormally || m_testProcess->exitCode() != 0) { reply_ok = false; + reply_txt += m_deviceTestOutput; reply_txt += tr("Remote process failed: %1\n") .arg(m_testProcess->errorString()); } else if (control_mode == ConfigCheck) { |