summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qprocess/tst_qprocess.cpp')
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 32cd6b7266..f5754c07aa 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -73,10 +73,9 @@ class tst_QProcess : public QObject
{
Q_OBJECT
-#ifdef QT_NO_PROCESS
public slots:
void initTestCase();
-#else
+#ifndef QT_NO_PROCESS
private slots:
void getSetCheck();
void constructing();
@@ -166,13 +165,18 @@ private:
#endif
};
-#ifdef QT_NO_PROCESS
void tst_QProcess::initTestCase()
{
+#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
+#else
+ // chdir to our testdata path and execute helper apps relative to that.
+ QString testdata_dir = QFileInfo(QFINDTESTDATA("testProcessNormal")).absolutePath();
+ QVERIFY2(QDir::setCurrent(testdata_dir), qPrintable("Could not chdir to " + testdata_dir));
+#endif
}
-#else
+#ifndef QT_NO_PROCESS
// Testing get/set functions
void tst_QProcess::getSetCheck()