Changed qprocess unittest to work from installation directory.
authorKurt Korbatits <kurt.korbatits@nokia.com>
Thu, 12 Jan 2012 03:07:12 +0000 (13:07 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 16 Jan 2012 00:55:18 +0000 (01:55 +0100)
- All subprograms installed as part of test instead of separate installs
  using installTestHelperApp() from testcase.prf
- Removed use of app_bundle for subprograms

Change-Id: I0a3de021800d36bd48479f63588b09fc7e60f32f
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
25 files changed:
tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
tests/auto/corelib/io/qprocess/qprocess.pri [new file with mode: 0644]
tests/auto/corelib/io/qprocess/qprocess.pro
tests/auto/corelib/io/qprocess/test/test.pro
tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro
tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
tests/auto/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro
tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro
tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro
tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
tests/auto/corelib/io/qprocess/tst_qprocess.cpp

index 360981f..947dc91 100644 (file)
@@ -3,7 +3,3 @@ CONFIG += console
 CONFIG -= app_bundle
 QT = core
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pri b/tests/auto/corelib/io/qprocess/qprocess.pri
new file mode 100644 (file)
index 0000000..8047bc4
--- /dev/null
@@ -0,0 +1,17 @@
+SUBPROGRAMS = \
+          testProcessCrash \
+          testProcessEcho \
+          testProcessEcho2 \
+          testProcessEcho3 \
+          testProcessEnvironment \
+          testProcessLoopback \
+          testProcessNormal \
+          testProcessOutput \
+          testProcessDeadWhileReading \
+          testProcessEOF \
+          testExitCodes \
+          testGuiProcess \
+          testDetached \
+          fileWriterProcess \
+          testSetWorkingDirectory \
+          testSoftExit
index 67c5f54..4155e3f 100644 (file)
@@ -1,27 +1,14 @@
 TEMPLATE = subdirs
 
-SUBDIRS = \
-          testProcessCrash \
-          testProcessEcho \
-          testProcessEcho2 \
-          testProcessEcho3 \
-          testProcessEnvironment \
-          testProcessLoopback \
-          testProcessNormal \
-          testProcessOutput \
-          testProcessDeadWhileReading \
-          testProcessEOF \
-          testProcessSpacesArgs/nospace.pro \
-          testExitCodes \
-          testSpaceInName \
-          testGuiProcess \
-          testDetached \
-          fileWriterProcess \
-          testSetWorkingDirectory \
-          testProcessSpacesArgs/onespace.pro \
-          testProcessSpacesArgs/twospaces.pro \
-          testSoftExit
+include(qprocess.pri)
+SUBDIRS  = $$SUBPROGRAMS
+# Add special cases
+SUBDIRS += testProcessSpacesArgs/nospace.pro \
+           testProcessSpacesArgs/onespace.pro \
+           testProcessSpacesArgs/twospaces.pro \
+           testSpaceInName
 
 win32:!wince*:SUBDIRS+=testProcessEchoGui
 
+test.depends += $$SUBDIRS
 SUBDIRS += test
index a8dba5e..fb21800 100644 (file)
@@ -5,4 +5,12 @@ SOURCES = ../tst_qprocess.cpp
 
 TARGET = ../tst_qprocess
 
-TESTDATA += ../testBatFiles/*
+win32:TESTDATA += ../testBatFiles/*
+
+include(../qprocess.pri)
+load(testcase) # for target.path and installTestHelperApp()
+for(file, SUBPROGRAMS): installTestHelperApp("../$${file}/$${file}",$${file},$${file})
+installTestHelperApp("../testProcessSpacesArgs/nospace",testProcessSpacesArgs,nospace)
+installTestHelperApp("../testProcessSpacesArgs/one space",testProcessSpacesArgs,"one space")
+installTestHelperApp("../testProcessSpacesArgs/two space s",testProcessSpacesArgs,"two space s")
+installTestHelperApp("../test Space In Name/testSpaceInName","test Space In Name",testSpaceInName)
index e307379..8d1fcba 100644 (file)
@@ -4,7 +4,3 @@ CONFIG += console
 CONFIG -= app_bundle
 INSTALLS =
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index afa8e4c..b083718 100644 (file)
@@ -3,7 +3,3 @@ CONFIG -= qt app_bundle
 CONFIG += console
 
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index 992188b..8778da7 100644 (file)
@@ -1,8 +1,5 @@
 SOURCES += main.cpp
 QT += widgets
 CONFIG += console
+CONFIG -= app_bundle
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index 98c5b96..7ccc976 100644 (file)
@@ -3,7 +3,3 @@ CONFIG += console
 CONFIG -= qt app_bundle
 
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index a5f4697..fbb3411 100644 (file)
@@ -1,9 +1,5 @@
 SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
 CONFIG += console
 
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index 4efdad9..676318a 100644 (file)
@@ -4,7 +4,3 @@ CONFIG += console
 
 win32:!win32-g++*:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS-
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index f8dc695..e236e05 100644 (file)
@@ -1,8 +1,4 @@
 SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
 CONFIG += console
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index f8dc695..e236e05 100644 (file)
@@ -1,8 +1,4 @@
 SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
 CONFIG += console
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index f8dc695..e236e05 100644 (file)
@@ -1,8 +1,4 @@
 SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
 CONFIG += console
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index 65b408f..bedc76a 100644 (file)
@@ -3,9 +3,5 @@ win32 {
    !win32-borland:LIBS += -lUser32
 }
 
-CONFIG -= qt
+CONFIG -= qt app_bundle
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index 43378b6..a07ae00 100644 (file)
@@ -6,7 +6,3 @@ DESTDIR = ./
 mac {
   CONFIG -= app_bundle
 }
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index f8dc695..e236e05 100644 (file)
@@ -1,8 +1,4 @@
 SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
 CONFIG += console
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index 98c5b96..7ccc976 100644 (file)
@@ -3,7 +3,3 @@ CONFIG += console
 CONFIG -= qt app_bundle
 
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index f8dc695..e236e05 100644 (file)
@@ -1,8 +1,4 @@
 SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
 CONFIG += console
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index 93d0afb..e236e05 100644 (file)
@@ -2,7 +2,3 @@ SOURCES = main.cpp
 CONFIG -= qt app_bundle
 CONFIG += console
 DESTDIR = ./
-
-# This app is testdata for tst_qproces
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/testProcessSpacesArgs
-INSTALLS += target
index 0146a6a..527685e 100644 (file)
@@ -4,7 +4,3 @@ CONFIG += console
 DESTDIR = ./
 
 TARGET = "one space"
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/testProcessSpacesArgs
-INSTALLS += target
index f881c2a..1a7fc32 100644 (file)
@@ -4,7 +4,3 @@ CONFIG += console
 DESTDIR = ./
 
 TARGET = "two space s"
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/testProcessSpacesArgs
-INSTALLS += target
index d6cc96b..2ed59a7 100644 (file)
@@ -1,7 +1,4 @@
 SOURCES = main.cpp
 CONFIG += console
+CONFIG -= app_bundle
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index 5d4ec4f..d5f30bc 100644 (file)
@@ -9,7 +9,3 @@ unix {
 CONFIG -= qt app_bundle
 CONFIG += console
 DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
index eac0b59..5a0314f 100644 (file)
@@ -6,7 +6,3 @@ DESTDIR = "../test Space In Name"
 mac {
   CONFIG -= app_bundle
 }
-
-# This app is testdata for tst_qprocess
-target.path = "$$[QT_INSTALL_TESTS]/tst_qprocess/test Space In Name"
-INSTALLS += target
index c39e9f0..e16e00d 100644 (file)
@@ -400,11 +400,7 @@ void tst_QProcess::echoTest()
     process = new QProcess;
     connect(process, SIGNAL(readyRead()), this, SLOT(exitLoopSlot()));
 
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho/testProcessEcho.app");
-#else
     process->start("testProcessEcho/testProcessEcho");
-#endif
     QVERIFY(process->waitForStarted(5000));
 
     process->write(input);
@@ -456,11 +452,7 @@ void tst_QProcess::echoTest2()
     process = new QProcess;
     connect(process, SIGNAL(readyRead()), this, SLOT(exitLoopSlot()));
 
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho2/testProcessEcho2.app");
-#else
     process->start("testProcessEcho2/testProcessEcho2");
-#endif
     QVERIFY(process->waitForStarted(5000));
     QVERIFY(!process->waitForReadyRead(250));
     QCOMPARE(process->error(), QProcess::Timedout);
@@ -508,11 +500,7 @@ void tst_QProcess::echoTest_performance()
 #endif
 
     QProcess process;
-#ifdef Q_OS_MAC
-    process.start("testProcessLoopback/testProcessLoopback.app");
-#else
     process.start("testProcessLoopback/testProcessLoopback");
-#endif
 
     QByteArray array;
     array.resize(1024 * 1024);
@@ -663,11 +651,7 @@ void tst_QProcess::loopBackTest()
 #endif
 
     process = new QProcess;
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho/testProcessEcho.app");
-#else
     process->start("testProcessEcho/testProcessEcho");
-#endif
     QVERIFY(process->waitForStarted(5000));
 
     for (int i = 0; i < 100; ++i) {
@@ -693,11 +677,7 @@ void tst_QProcess::readTimeoutAndThenCrash()
 #endif
 
     process = new QProcess;
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho/testProcessEcho.app");
-#else
     process->start("testProcessEcho/testProcessEcho");
-#endif
     if (process->state() != QProcess::Starting)
         QCOMPARE(process->state(), QProcess::Running);
 
@@ -727,11 +707,7 @@ void tst_QProcess::waitForFinished()
 {
     QProcess process;
 
-#ifdef Q_OS_MAC
-    process.start("testProcessOutput/testProcessOutput.app");
-#else
     process.start("testProcessOutput/testProcessOutput");
-#endif
 
 #if !defined(Q_OS_WINCE)
     QVERIFY(process.waitForFinished(5000));
@@ -759,11 +735,7 @@ void tst_QProcess::deadWhileReading()
 
     QProcess process;
 
-#ifdef Q_OS_MAC
-    process.start("testProcessDeadWhileReading/testProcessDeadWhileReading.app");
-#else
     process.start("testProcessDeadWhileReading/testProcessDeadWhileReading");
-#endif
 
     QString output;
 
@@ -789,11 +761,7 @@ void tst_QProcess::restartProcessDeadlock()
     process = &proc;
     connect(process, SIGNAL(finished(int)), this, SLOT(restartProcess()));
 
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho/testProcessEcho.app");
-#else
     process->start("testProcessEcho/testProcessEcho");
-#endif
 
     QCOMPARE(process->write("", 1), qlonglong(1));
     QVERIFY(process->waitForFinished(5000));
@@ -806,11 +774,7 @@ void tst_QProcess::restartProcessDeadlock()
 
 void tst_QProcess::restartProcess()
 {
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho/testProcessEcho.app");
-#else
     process->start("testProcessEcho/testProcessEcho");
-#endif
 }
 
 //-----------------------------------------------------------------------------
@@ -854,11 +818,7 @@ void tst_QProcess::closeReadChannel()
         QProcess::ProcessChannel channel2 = QProcess::StandardError;
 
         QProcess proc;
-#ifdef Q_OS_MAC
-        proc.start("testProcessEcho2/testProcessEcho2.app");
-#else
         proc.start("testProcessEcho2/testProcessEcho2");
-#endif
         QVERIFY(proc.waitForStarted(5000));
         proc.closeReadChannel(i&1 ? channel2 : channel1);
         proc.setReadChannel(i&1 ? channel2 : channel1);
@@ -889,11 +849,7 @@ void tst_QProcess::openModes()
     QProcess proc;
     QVERIFY(!proc.isOpen());
     QVERIFY(proc.openMode() == QProcess::NotOpen);
-#ifdef Q_OS_MAC
-    proc.start("testProcessEcho3/testProcessEcho3.app");
-#else
     proc.start("testProcessEcho3/testProcessEcho3");
-#endif
     QVERIFY(proc.waitForStarted(5000));
     QVERIFY(proc.isOpen());
     QVERIFY(proc.openMode() == QProcess::ReadWrite);
@@ -941,11 +897,7 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
     QSignalSpy spy(&proc, SIGNAL(readyRead()));
     QVERIFY(spy.isValid());
 
-#ifdef Q_OS_MAC
-    proc.start("testProcessEcho/testProcessEcho.app");
-#else
     proc.start("testProcessEcho/testProcessEcho");
-#endif
 
     QCOMPARE(spy.count(), 0);
 
@@ -974,9 +926,7 @@ void tst_QProcess::hardExit()
 {
     QProcess proc;
 
-#if defined(Q_OS_MAC)
-    proc.start("testProcessEcho/testProcessEcho.app");
-#elif defined(Q_OS_WINCE)
+#if defined(Q_OS_WINCE)
     proc.start("testSoftExit/testSoftExit");
 #else
     proc.start("testProcessEcho/testProcessEcho");
@@ -1084,16 +1034,8 @@ void tst_QProcess::softExitInSlots_data()
 {
     QTest::addColumn<QString>("appName");
 
-#ifdef Q_OS_MAC
-    QTest::newRow("gui app") << "testGuiProcess/testGuiProcess.app";
-#else
     QTest::newRow("gui app") << "testGuiProcess/testGuiProcess";
-#endif
-#ifdef Q_OS_MAC
-    QTest::newRow("console app") << "testProcessEcho2/testProcessEcho2.app";
-#else
     QTest::newRow("console app") << "testProcessEcho2/testProcessEcho2";
-#endif
 }
 
 //-----------------------------------------------------------------------------
@@ -1126,11 +1068,7 @@ void tst_QProcess::mergedChannels()
     process.setReadChannelMode(QProcess::MergedChannels);
     QCOMPARE(process.readChannelMode(), QProcess::MergedChannels);
 
-#ifdef Q_OS_MAC
-    process.start("testProcessEcho2/testProcessEcho2.app");
-#else
     process.start("testProcessEcho2/testProcessEcho2");
-#endif
 
     QVERIFY(process.waitForStarted(5000));
 
@@ -1156,11 +1094,7 @@ void tst_QProcess::forwardedChannels()
     process.setReadChannelMode(QProcess::ForwardedChannels);
     QCOMPARE(process.readChannelMode(), QProcess::ForwardedChannels);
 
-#ifdef Q_OS_MAC
-    process.start("testProcessEcho2/testProcessEcho2.app");
-#else
     process.start("testProcessEcho2/testProcessEcho2");
-#endif
 
     QVERIFY(process.waitForStarted(5000));
     QCOMPARE(process.write("forwarded\n"), qlonglong(10));
@@ -1181,11 +1115,7 @@ void tst_QProcess::atEnd()
 
     QProcess process;
 
-#ifdef Q_OS_MAC
-    process.start("testProcessEcho/testProcessEcho.app");
-#else
     process.start("testProcessEcho/testProcessEcho");
-#endif
     process.write("abcdefgh\n");
 
     while (process.bytesAvailable() < 8)
@@ -1219,11 +1149,7 @@ protected:
         connect(&process, SIGNAL(finished(int)), this, SLOT(catchExitCode(int)),
                 Qt::DirectConnection);
 
-#ifdef Q_OS_MAC
-        process.start("testProcessEcho/testProcessEcho.app");
-#else
         process.start("testProcessEcho/testProcessEcho");
-#endif
 
 #if !defined(Q_OS_WINCE)
         QCOMPARE(process.write("abc\0", 4), qint64(4));
@@ -1284,11 +1210,7 @@ void tst_QProcess::waitForFinishedWithTimeout()
 
     process = new QProcess(this);
 
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho/testProcessEcho.app");
-#else
     process->start("testProcessEcho/testProcessEcho");
-#endif
 
     QVERIFY(process->waitForStarted(5000));
     QVERIFY(!process->waitForFinished(1));
@@ -1313,11 +1235,7 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot()
     connect(process, SIGNAL(finished(int)), this, SLOT(exitLoopSlot()));
     bytesAvailable = 0;
 
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho/testProcessEcho.app");
-#else
     process->start("testProcessEcho/testProcessEcho");
-#endif
     QVERIFY(process->waitForStarted(5000));
 
     QSignalSpy spy(process, SIGNAL(readyRead()));
@@ -1359,11 +1277,7 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
     connect(process, SIGNAL(bytesWritten(qint64)), this, SLOT(waitForBytesWrittenInABytesWrittenSlotSlot()));
     bytesAvailable = 0;
 
-#ifdef Q_OS_MAC
-    process->start("testProcessEcho/testProcessEcho.app");
-#else
     process->start("testProcessEcho/testProcessEcho");
-#endif
     QVERIFY(process->waitForStarted(5000));
 
     qRegisterMetaType<qint64>("qint64");
@@ -1712,11 +1626,7 @@ void tst_QProcess::removeFileWhileProcessIsRunning()
     QVERIFY(file.open(QFile::WriteOnly));
 
     QProcess process;
-#ifdef Q_OS_MAC
-    process.start("testProcessEcho/testProcessEcho.app");
-#else
     process.start("testProcessEcho/testProcessEcho");
-#endif
 
     QVERIFY(process.waitForStarted(5000));
 
@@ -1900,11 +1810,7 @@ void tst_QProcess::atEnd2()
 
     QProcess process;
 
-#ifdef Q_OS_MAC
-    process.start("testProcessEcho/testProcessEcho.app");
-#else
     process.start("testProcessEcho/testProcessEcho");
-#endif
     process.write("Foo\nBar\nBaz\nBodukon\nHadukan\nTorwukan\nend\n");
     process.putChar('\0');
     QVERIFY(process.waitForFinished());
@@ -1956,11 +1862,7 @@ void tst_QProcess::setStandardInputFile()
     file.close();
 
     process.setStandardInputFile("data");
-#ifdef Q_OS_MAC
-    process.start("testProcessEcho/testProcessEcho.app");
-#else
     process.start("testProcessEcho/testProcessEcho");
-#endif
 
     QPROCESS_VERIFY(process, waitForFinished());
         QByteArray all = process.readAll();
@@ -2027,11 +1929,7 @@ void tst_QProcess::setStandardOutputFile()
     else
         process.setStandardErrorFile("data", mode);
 
-#ifdef Q_OS_MAC
-    process.start("testProcessEcho2/testProcessEcho2.app");
-#else
     process.start("testProcessEcho2/testProcessEcho2");
-#endif
     process.write(testdata, sizeof testdata);
     QPROCESS_VERIFY(process,waitForFinished());
 
@@ -2075,13 +1973,8 @@ void tst_QProcess::setStandardOutputProcess()
     source.setReadChannelMode(merged ? QProcess::MergedChannels : QProcess::SeparateChannels);
     source.setStandardOutputProcess(&sink);
 
-#ifdef Q_OS_MAC
-    source.start("testProcessEcho2/testProcessEcho2.app");
-    sink.start("testProcessEcho2/testProcessEcho2.app");
-#else
     source.start("testProcessEcho2/testProcessEcho2");
     sink.start("testProcessEcho2/testProcessEcho2");
-#endif
 
     QByteArray data("Hello, World");
     source.write(data);
@@ -2179,11 +2072,7 @@ void tst_QProcess::switchReadChannels()
 
     QProcess process;
 
-#ifdef Q_OS_MAC
-    process.start("testProcessEcho2/testProcessEcho2.app");
-#else
     process.start("testProcessEcho2/testProcessEcho2");
-#endif
     process.write(data);
     process.closeWriteChannel();
     QVERIFY(process.waitForFinished(5000));
@@ -2212,11 +2101,7 @@ void tst_QProcess::setWorkingDirectory()
 #endif
     process = new QProcess;
     process->setWorkingDirectory("test");
-#ifdef Q_OS_MAC
-    process->start("testSetWorkingDirectory/testSetWorkingDirectory.app");
-#else
     process->start("testSetWorkingDirectory/testSetWorkingDirectory");
-#endif
 #ifndef Q_OS_WIN
     QSKIP("setWorkingDirectory will chdir before starting the process on unices");
 #endif
@@ -2237,11 +2122,7 @@ void tst_QProcess::startFinishStartFinish()
     for (int i = 0; i < 3; ++i) {
         QCOMPARE(process.state(), QProcess::NotRunning);
 
-#ifdef Q_OS_MAC
-        process.start("testProcessOutput/testProcessOutput.app");
-#else
         process.start("testProcessOutput/testProcessOutput");
-#endif
 #if !defined(Q_OS_WINCE)
         QVERIFY(process.waitForReadyRead(10000));
         QCOMPARE(QString::fromLatin1(process.readLine().trimmed()),