diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-07-10 18:45:28 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-12 18:34:56 +0200 |
commit | d693a8914c7e8fa0c91df58802b4bb469b4b7a93 (patch) | |
tree | 6794ec5e2c235b6456d6fa3e948f2618bed6392f /tests/auto/corelib | |
parent | f235ca4079043e6d5e37a204e52e9e482dc4db2c (diff) |
Fix small problems with tst_QProcess
Remember to register the metatype where we use it, so we don't depend
on another test being run previously.
And skip the setWorkingDirectory test completely on Unix. I don't know
why it needs to be skipped, but if we're not going to verify anything,
don't even try to do anything. This saves us one memory leak at least.
Change-Id: I22e151cc3fa7b4e976972aca8978b88b263d9bee
Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/io/qprocess/tst_qprocess.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp index 0ffaca14b5..0c020fbe66 100644 --- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp +++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp @@ -2122,12 +2122,12 @@ void tst_QProcess::setWorkingDirectory() #ifdef Q_OS_WINCE QSKIP("Windows CE does not support working directory logic"); #endif - process = new QProcess; - process->setWorkingDirectory("test"); - process->start("testSetWorkingDirectory/testSetWorkingDirectory"); #ifndef Q_OS_WIN QSKIP("setWorkingDirectory will chdir before starting the process on unices"); #endif + process = new QProcess; + process->setWorkingDirectory("test"); + process->start("testSetWorkingDirectory/testSetWorkingDirectory"); QVERIFY(process->waitForFinished()); QByteArray workingDir = process->readAllStandardOutput(); @@ -2184,6 +2184,7 @@ void tst_QProcess::invalidProgramString() //----------------------------------------------------------------------------- void tst_QProcess::onlyOneStartedSignal() { + qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus"); QProcess process; QSignalSpy spyStarted(&process, SIGNAL(started())); |