summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-07-04 06:53:58 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-07-04 06:53:58 (GMT)
commit73d7fdf686c05adaf0ea8ecddfb264b7741a2e6a (patch)
treefd27b7291a0ded930899854bd75b41b8989fb133 /tools
parent1d5041c712acd10020c38a92f1eedc88368ca19f (diff)
parentb4f575f4cc1775fe1c26dedffc78ca1ee2434652 (diff)
downloadQt-73d7fdf686c05adaf0ea8ecddfb264b7741a2e6a.zip
Qt-73d7fdf686c05adaf0ea8ecddfb264b7741a2e6a.tar.gz
Qt-73d7fdf686c05adaf0ea8ecddfb264b7741a2e6a.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: Fixing winscw def file broken by recent merge runonphone: Change the upload option to allow uploading any file runonphone: Include the manufacturer name in the friendly name on OS X runonphone: Fix usb device enumeration on Mac OS X
Diffstat (limited to 'tools')
-rw-r--r--tools/runonphone/main.cpp14
-rw-r--r--tools/runonphone/serenum_unix.cpp10
2 files changed, 15 insertions, 9 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);
diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp
index dc9e1d6..9a33dab 100644
--- a/tools/runonphone/serenum_unix.cpp
+++ b/tools/runonphone/serenum_unix.cpp
@@ -148,7 +148,8 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
foreach (int i, usableInterfaces) {
#ifdef Q_OS_MAC
eligibleInterfaces << QString("^cu\\.usbmodem.*%1$")
- .arg(QString("%1").arg(descriptor.bInterfaceNumber, 1, 16).toUpper());
+ .arg(QString("%1").arg(i, 1, 16).toUpper());
+ eligibleInterfacesInfo << InterfaceInfo(manufacturerString, productString, device->descriptor.idVendor, device->descriptor.idProduct);
#else
// ### manufacturer and product strings are only readable as root :(
if (!manufacturerString.isEmpty() && !productString.isEmpty()) {
@@ -161,7 +162,11 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
}
#endif
}
+#ifndef Q_OS_MAC
+ // On mac, we need a 1-1 mapping between eligibleInterfaces and eligibleInterfacesInfo
+ // in order to find the friendly name for an interface
eligibleInterfacesInfo << InterfaceInfo(manufacturerString, productString, device->descriptor.idVendor, device->descriptor.idProduct);
+#endif
}
}
}
@@ -185,7 +190,8 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
if (loglevel > 1)
qDebug() << " found device file:" << info.fileName() << endl;
#ifdef Q_OS_MAC
- friendlyName = eligibleInterfacesInfo[eligibleInterfaces.indexOf(iface)].product;
+ InterfaceInfo info = eligibleInterfacesInfo[eligibleInterfaces.indexOf(iface)];
+ friendlyName = info.manufacturer + " " + info.product;
#endif
usable = true;
break;