summaryrefslogtreecommitdiffstats
path: root/tools/qtestlib/wince/cetest
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-07-02 01:42:25 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-07-02 05:19:29 (GMT)
commitfb1fa68ae8555deeaeaf6f193c678269c85ffc4d (patch)
treeae24efe6a5b6ea12b0ff10199749d058eb3d1e7d /tools/qtestlib/wince/cetest
parentcdfb2ed5096053314c0e23482609a1a491636ac1 (diff)
downloadQt-fb1fa68ae8555deeaeaf6f193c678269c85ffc4d.zip
Qt-fb1fa68ae8555deeaeaf6f193c678269c85ffc4d.tar.gz
Qt-fb1fa68ae8555deeaeaf6f193c678269c85ffc4d.tar.bz2
Let QtRemote report the error code to cetest when creating the test
process fails. This gives some hint to the user in the case of problems like missing DLLs, as opposed to silent failure. Reviewed-by: Michael Goddard
Diffstat (limited to 'tools/qtestlib/wince/cetest')
-rw-r--r--tools/qtestlib/wince/cetest/activesyncconnection.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/qtestlib/wince/cetest/activesyncconnection.cpp b/tools/qtestlib/wince/cetest/activesyncconnection.cpp
index 76e4a41..99fac2c 100644
--- a/tools/qtestlib/wince/cetest/activesyncconnection.cpp
+++ b/tools/qtestlib/wince/cetest/activesyncconnection.cpp
@@ -382,6 +382,7 @@ bool ActiveSyncConnection::execute(QString program, QString arguments, int timeo
BYTE* output;
IRAPIStream *stream;
int returned = 0;
+ DWORD error = 0;
HRESULT res = CeRapiInvoke(dllLocation.utf16(), functionName.utf16(), 0, 0, &outputSize, &output, &stream, 0);
if (S_OK != res) {
if (S_OK != CeGetLastError())
@@ -416,9 +417,18 @@ bool ActiveSyncConnection::execute(QString program, QString arguments, int timeo
if (S_OK != stream->Read(&returned, sizeof(returned), &written)) {
qWarning(" Could not access return value of process");
}
- result = true;
- }
+ if (S_OK != stream->Read(&error, sizeof(error), &written)) {
+ qWarning(" Could not access error code");
+ }
+ if (error) {
+ qWarning() << "Error on target:" << strwinerror(error);
+ result = false;
+ }
+ else {
+ result = true;
+ }
+ }
if (returnValue)
*returnValue = returned;