diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-28 15:03:37 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-28 15:03:37 (GMT) |
commit | e154fb84b075ad3fda4ac02d620b28cc50e46c09 (patch) | |
tree | 04dc1689814817dc175b2e5b5cd81705ca8cdd7f /tools | |
parent | ec6065c51e1821a7364e66d7500c17d2575ea334 (diff) | |
parent | a3c3949ae693b72a6d5ffddd03fa8afc76c56b99 (diff) | |
download | Qt-e154fb84b075ad3fda4ac02d620b28cc50e46c09.zip Qt-e154fb84b075ad3fda4ac02d620b28cc50e46c09.tar.gz Qt-e154fb84b075ad3fda4ac02d620b28cc50e46c09.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging:
Default graphics memory quota for Symbian applications
Fix warning about missing qs60keycapture_p.h header in gui
Reimplement MR1271 over coda patch
Fixed Symbian memory leak in utcToLocal(QDate &, QTime &)
Fix bad merge on a couple of xml examples
DEF file freeze
Diffstat (limited to 'tools')
-rw-r--r-- | tools/runonphone/main.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index 868a2a8..af349eb 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -65,7 +65,7 @@ void printUsage(QTextStream& outstream, QString exeName) << "-t, --timeout <milliseconds> terminate test if timeout occurs" << endl << "-v, --verbose show debugging output" << endl << "-q, --quiet hide progress messages" << endl - << "-u, --upload <local file> upload executable file to phone" << endl + << "-u, --upload <local file> <remote file> upload file to phone" << endl << "-d, --download <remote file> <local file> copy file from phone to PC after running test" << endl << "--nocrashlog Don't capture call stack if test crashes" << endl << "--crashlogpath <dir> Path to save crash logs (default=working dir)" << endl @@ -91,6 +91,7 @@ int main(int argc, char *argv[]) QTextStream outstream(stdout); QTextStream errstream(stderr); QString uploadLocalFile; + QString uploadRemoteFile; QString downloadRemoteFile; QString downloadLocalFile; int loglevel=1; @@ -127,10 +128,8 @@ int main(int argc, char *argv[]) errstream << "Executable file (" << uploadLocalFile << ") doesn't exist" << endl; return 1; } - if (!(QFileInfo(uploadLocalFile).suffix() == "exe")) { - errstream << "File (" << uploadLocalFile << ") must be an executable" << endl; - return 1; - } + CHECK_PARAMETER_EXISTS + uploadRemoteFile = it.next(); } else if (arg == "--download" || arg == "-d") { CHECK_PARAMETER_EXISTS @@ -174,7 +173,8 @@ int main(int argc, char *argv[]) } } - if (exeFile.isEmpty() && sisFile.isEmpty() && uploadLocalFile.isEmpty() && + if (exeFile.isEmpty() && sisFile.isEmpty() && + (uploadLocalFile.isEmpty() || uploadRemoteFile.isEmpty()) && (downloadLocalFile.isEmpty() || downloadRemoteFile.isEmpty())) { printUsage(outstream, args[0]); return 1; @@ -230,8 +230,7 @@ int main(int argc, char *argv[]) } else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { codaHandler.setActionType(ActionCopy); - QString dstName = QString("c:\\sys\\bin\\") + uploadInfo.fileName(); - codaHandler.setCopyFileName(uploadLocalFile, dstName); + codaHandler.setCopyFileName(uploadLocalFile, uploadRemoteFile); } if (!exeFile.isEmpty()) { codaHandler.setActionType(ActionRun); @@ -254,19 +253,20 @@ int main(int argc, char *argv[]) } else { launcher.reset(new trk::Launcher(trk::Launcher::ActionPingOnly)); + QStringList srcNames, dstNames; if (!sisFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionCopyInstall); - QStringList srcName(sisFile); - QStringList dstName("c:\\data\\testtemp.sis"); - launcher->setCopyFileNames(srcName, dstName); - launcher->setInstallFileNames(dstName); + srcNames.append(sisFile); + QLatin1String dstName("c:\\data\\testtemp.sis"); + dstNames.append(dstName); + launcher->setInstallFileNames(QStringList(dstName)); } - else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { + if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { launcher->addStartupActions(trk::Launcher::ActionCopy); - QStringList srcName(uploadLocalFile); - QStringList dstName(QString("c:\\sys\\bin\\") + uploadInfo.fileName()); - launcher->setCopyFileNames(srcName, dstName); + srcNames.append(uploadLocalFile); + dstNames.append(uploadRemoteFile); } + launcher->setCopyFileNames(srcNames, dstNames); if (!exeFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionRun); launcher->setFileName(QString("c:\\sys\\bin\\") + info.fileName()); |