summaryrefslogtreecommitdiffstats
path: root/tools/qtestlib
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-07-09 16:51:41 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-07-09 16:51:41 +1000
commit458c547aefcb529fe807a220109e2a7ce6bd9105 (patch)
tree767f21cf15b2bbc7338242b53acc7d86da1fe533 /tools/qtestlib
parent21b32a69fc4607e60677b978fbcdc6424cc4f63b (diff)
Improved cetest error reporting.
Now, if you try to run an unsigned test on a locked device, you'll get: "Error invoking qRemoteLaunch on \Windows\QtRemote.dll: Invalid Signature. (0x80090006)" Instead of what you would previously get: "Error: Could not execute target file"
Diffstat (limited to 'tools/qtestlib')
-rw-r--r--tools/qtestlib/wince/cetest/activesyncconnection.cpp12
-rw-r--r--tools/qtestlib/wince/cetest/remoteconnection.cpp4
2 files changed, 10 insertions, 6 deletions
diff --git a/tools/qtestlib/wince/cetest/activesyncconnection.cpp b/tools/qtestlib/wince/cetest/activesyncconnection.cpp
index 0f986195ee..108047774e 100644
--- a/tools/qtestlib/wince/cetest/activesyncconnection.cpp
+++ b/tools/qtestlib/wince/cetest/activesyncconnection.cpp
@@ -385,10 +385,14 @@ bool ActiveSyncConnection::execute(QString program, QString arguments, int timeo
DWORD error = 0;
HRESULT res = CeRapiInvoke(dllLocation.utf16(), functionName.utf16(), 0, 0, &outputSize, &output, &stream, 0);
if (S_OK != res) {
- if (S_OK != CeGetLastError())
- debugOutput(QString::fromLatin1("Error: Could not invoke method on QtRemote"),1);
- else
- debugOutput(QString::fromLatin1("Error: QtRemote return unexpectedly with error Code %1").arg(res), 1);
+ DWORD ce_error = CeGetLastError();
+ if (S_OK != ce_error) {
+ qWarning("Error invoking %s on %s: %s", qPrintable(functionName),
+ qPrintable(dllLocation), strwinerror(ce_error).constData());
+ } else {
+ qWarning("Error: %s on %s unexpectedly returned %d", qPrintable(functionName),
+ qPrintable(dllLocation), res);
+ }
} else {
DWORD written;
int strSize = program.length();
diff --git a/tools/qtestlib/wince/cetest/remoteconnection.cpp b/tools/qtestlib/wince/cetest/remoteconnection.cpp
index 75788e2cb2..3d0c3f3355 100644
--- a/tools/qtestlib/wince/cetest/remoteconnection.cpp
+++ b/tools/qtestlib/wince/cetest/remoteconnection.cpp
@@ -66,8 +66,8 @@ QByteArray strwinerror(DWORD errorcode)
out.chop(2);
/* Append error number to error message for good measure */
- out.append(" (");
- out.append(QByteArray::number((int)errorcode));
+ out.append(" (0x");
+ out.append(QByteArray::number(uint(errorcode), 16).rightJustified(8, '0'));
out.append(")");
}
return out;