diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-07-26 13:30:24 (GMT) |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-07-26 13:30:24 (GMT) |
commit | 16502c81a92cc4a0c4d8753372b568cdc61f0c53 (patch) | |
tree | 79a303d8b7b17f086f5d830850c2f19bc004bc9f /tools/runonphone/main.cpp | |
parent | 4fe2205d2fe1e8eaf3d4122c74a29862b5d04bfe (diff) | |
parent | aa19362a14ce20bde2ada61edf7b946019845ed2 (diff) | |
download | Qt-16502c81a92cc4a0c4d8753372b568cdc61f0c53.zip Qt-16502c81a92cc4a0c4d8753372b568cdc61f0c53.tar.gz Qt-16502c81a92cc4a0c4d8753372b568cdc61f0c53.tar.bz2 |
Merge remote-tracking branch 'upstream/4.8'
Diffstat (limited to 'tools/runonphone/main.cpp')
-rw-r--r-- | tools/runonphone/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index e400062..d749106 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -62,7 +62,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 @@ -86,6 +86,7 @@ int main(int argc, char *argv[]) QTextStream outstream(stdout); QTextStream errstream(stderr); QString uploadLocalFile; + QString uploadRemoteFile; QString downloadRemoteFile; QString downloadLocalFile; int loglevel=1; @@ -121,10 +122,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 @@ -161,7 +160,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; @@ -211,7 +211,7 @@ int main(int argc, char *argv[]) } else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { launcher->addStartupActions(trk::Launcher::ActionCopy); - launcher->setCopyFileName(uploadLocalFile, QString("c:\\sys\\bin\\") + uploadInfo.fileName()); + launcher->setCopyFileName(uploadLocalFile, uploadRemoteFile); } if (!exeFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionRun); |