summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess
Commit message (Collapse)AuthorAgeFilesLines
* Remove usages of deprecated APIs of corelibSona Kurazyan2019-07-051-40/+209
| | | | | | | | | | | | | | | | | | - Replaced the usages of deprecated APIs of corelib by corresponding alternatives in the library code and documentation. - Modified the tests to make them build when deprecated APIs disabled: * Made the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, added tests for the replacement. Task-number: QTBUG-76491 Task-number: QTBUG-76539 Task-number: QTBUG-76541 Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-141-3/+4
| | | | | | | | Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Migrate Windows system libs to external dependenciesJoerg Bornemann2019-05-082-2/+2
| | | | | | Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-021-2/+0
|\ | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I8ca1163a1fa8072dcd16ea4426c58219149599fd
| * Remove cruft from testProcessEOF.proJoerg Bornemann2019-04-301-2/+0
| | | | | | | | | | | | | | TEMPLATE_PREFIX is gone since Qt 5.0.0. Change-Id: I181962b942191187baf62f13d0abd17e7ebdcce1 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-1923-52/+39
|\| | | | | | | Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
| * Add cmdline feature to qmakeJoerg Bornemann2019-02-1823-52/+39
| | | | | | | | | | | | | | | | | | [ChangeLog][qmake] A new feature "cmdline" was added that implies "CONFIG += console" and "CONFIG -= app_bundle". Task-number: QTBUG-27079 Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* | QProcess: mark obsolete functions as deprecatedChristian Ehrlicher2019-01-231-9/+9
|/ | | | | | | | | | QProcess::finished(int)/readChannelMode()/setReadChannelMode() are obsolete but were not marked as deprecated. Explicit mark them as deprecated so they can be removed with Qt6. Change-Id: Iedbfd80a3c987f35caf93181e9277913a18961d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QProcess::startDetached: Fix behavior change on WindowsJoerg Bornemann2018-08-035-25/+126
| | | | | | | | | Do not overwrite stdout/stderr by default, but only if requested. This restores the behavior of QProcess::startDetached of Qt 5.9. Task-number: QTBUG-67905 Change-Id: Idccf7b0da7bd80f88a0624286ddf2851bc974fb1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Skip tst_QProcess::processesInMultipleThreads under QEMUKari Oikarinen2018-05-142-0/+5
| | | | | | | | | | | | | | tst_QProcess hangs sometimes in QEMU. Based on my experiments in a debug VM the offending test seems to be processesInMultipleThreads(), since that was were I was able to reproduce the hanging in. Since the whole test executable hangs, blacklisting is not enough, so skip the test. Task-number: QTBUG-67760 Change-Id: I34f8852be955a8612deac22b369f68d79a139d11 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Blacklist tst_QProcess::softExitInSlots on WindowsKari Oikarinen2018-03-231-0/+3
| | | | | | | | Task-number: QTBUG-66903 Task-number: QTBUG-66216 Change-Id: I4a36d6f4b980f016e11fd7a8840dbc60a2964e83 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-2/+2
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-131-1/+2
|\ | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * tst_QProcess/tst_QFile: Extend blacklisting to MSVC2017Friedemann Kleint2017-07-051-1/+2
| | | | | | | | | | | | | | | | | | | | Extend the blacklisting introduced by 0ebebeb983d381010fae710aee60d8550d9be4f3. Task-number: QTBUG-48455 Task-number: QTBUG-48504 Change-Id: Idf44948a5ede433435a8d0b61fef6413bb0b69bc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-191-0/+42
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Use QMap in QProcessEnvironment so variables are sortedThomas Sondergaard2017-06-131-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this change is to make it simple to pass a correctly sorted environment block to Win32 CreateProcess(). It is also nice in other contexts that the environment variables are sorted. The change is made for all platforms. This keeps it simple and the only ill effect is slightly slower lookups. Concerning the environment block passed to Win32 CreateProcess: The environment block that is passed to CreateProcess() must be sorted case-insensitively and without regard to locale. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx The need for sorting the environment block is also mentioned in the CreateProcess() documentation, but with less details: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx Task-number: QTBUG-61315 Change-Id: Ie1edd443301de79cf5f699d45beab01b7c0f9de3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Support standard channel redirection in QProcess::startDetachedJoerg Bornemann2017-06-132-17/+106
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QProcess] Added support for standard channel redirection using setStandard{Input|Output|Error}File to QProcess::startDetached. Task-number: QTBUG-2058 Task-number: QTBUG-37656 Change-Id: Iafb9bd7899f752d0305e3410ad4dcb7ef598dc79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Support setCreateProcessArgumentsModifier in QProcess:startDetachedJoerg Bornemann2017-04-231-0/+8
| | | | | | | | | | | | | | | | | | Factor out both CreateProcess calls into one function that also calls the modifier callback for the CreateProcessArguments struct. Task-number: QTBUG-57687 Change-Id: I9d2ef4f2d7cd077aa4c3eba926ab4dfb9e570291 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QProcess::startDetached: support custom process environmentJoerg Bornemann2017-03-312-9/+19
|/ | | | | | | | | | | | | | | | | Starting a detached process with a custom process environment can now be achieved by: QProcess p; p.setProgram("foo"); p.setProcessEnvironment(myEnv); p.startDetached(); [ChangeLog][QtCore][QProcess] Added the ability to set a custom process environment for detached processes. Task-number: QTBUG-2284 Change-Id: I49406dffb64fa2aed41ea05cb271bd42eeabb729 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-132-15/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Properly use the "process" featureUlf Hermann2017-02-272-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Increase timeout of tst_QProcess::softExitInSlots even moreJoerg Bornemann2017-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | Commit eab7efd1 increased the timeout for this test, but apparently 10 seconds are still not enough. Set the timeout to a minute. Task-number: QTBUG-59075 Change-Id: Iebab8e5c73c4858ca90063a82aedfbb2546a62cc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | macOS: Don't build auto-tests as application bundles unless explicitly requestedTor Arne Vestbø2016-10-231-1/+1
|/ | | | | | | | Consistent with other Unix platforms, and internally consistent between tests, as a lot of tests were already applying CONFIG -= app_bundle manually. Change-Id: Icd2b7e1c08015b26137af60ff82fddbc753f0ff4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-6/+9
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-101-6/+9
| |\ | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
| | * Fix tst_QProcess::closeWriteChannel() under WindowsAlex Trotsenko2016-08-051-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, this test fails in CI due to notifications arriving asynchronously from the OS. This happens inside closeWriteChannel() call, where we are flushing the write buffer and I/O completion on the read pipe could occur there as well. So, take this into account before waiting for the new incoming data. Also, improve the checks on successful reading and writing. Change-Id: Iabe875fc346eb4420c72d03208d22ea861a570c6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Remove Windows CE vestigesJoerg Bornemann2016-06-023-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove every usage of the _WIN32_WCE macro outside of 3rd party source code directories. Change-Id: Ia7e859bd6dcaef10c66674612c8e440f9a2dee56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-051-28/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Simon Hausmann2016-03-231-28/+10
| |\| | | | | | | | | | Change-Id: I9a10e1f3c9506ec8554d8f59b6300825ac730939
| | * Remove QPROCESS_USE_SPAWN and all that it surroundsJames McDonnell2016-03-221-28/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spawn code was only used to make QProcess work on QNX 6.5.0. Fork works on QNX 6.6.0. The QNX spawn implementation has a flaw that causes a deadlock in certain situations. When a working directory is specified for the process, the QNX spawn implementation stops all threads except the one doing the spawn so that it can temporarily change the process' working directory. This can lead to a deadlock if the thread does anything that conficts with something being done in a stopped thread. QNX 6.5.0 is no longer supported in Qt 5.6.0 so we can just switch QNX to the fork implementation and get rid of the spawn implementation. Made a QNX specific adjustment to the hardExit test. There's a bug in the OS that the test can run into because it does something that normal applications wouldn't. Task-number: QTBUG-47250 Change-Id: Ib32567d2c15ce651815858000035ac5aa6f35224 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | QtCore: Remove Windows CE.Friedemann Kleint2016-03-305-160/+9
|/ / | | | | | | | | | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-29/+39
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * Fix crash in QProcess::waitForFinished on WindowsJoerg Bornemann2016-02-291-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose the user connects QProcess::readyReadStandardOutput with a slot that calls QCoreApplication::processEvents. Assume the event loop did not handle events between QProcess::start and QProcess::waitForFinished. The process writes to stdout and exits. QProcessPrivate::waitForFinished calls drainOutputPipes which calls QWindowsPipeWriter::waitForReadyRead. This in turn will trigger _q_processDied via the readyRead signal and processEvents. _q_processDied will delete the pid object and set pid to null. After drainOutputPipes returns, _q_processDied is called again but it must not be called if pid is already destroyed. Prevent calling _q_processDied if pid is null. Task-number: QTBUG-48697 Change-Id: Iee047938ee1529057a1a43d71f4e882750903c7e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Remove superfluous Windows CE special cases from tst_qprocess.cppJoerg Bornemann2016-02-291-29/+6
| | | | | | | | | | | | | | | | | | | | | | Use default timeouts for wait functions. The increased timeouts will only have an effect if the tests fail. Print process errors if the process could not be started, while we're at it. Contract consecutive "#ifndef Q_OS_WINCE" blocks. Change-Id: I6324e4c5b91b89ebb2580635b88705bbda922907 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-291-17/+18
|\| | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qprocess/tst_qprocess.cpp Change-Id: Ib6955eb874b516b185b45d6c38cec646fbaa95f4
| * Remove legacy from tst_qprocess.cppJoerg Bornemann2016-02-241-8/+0
| | | | | | | | | | | | | | | | | | The windows.h include is not needed, the enums are properly known to the metaobject system nowadays, and qprocess_p.h already has a QT_NO_PROCESS guard. Change-Id: I6bbdce19f097feb8260c51a29425279049aa0192 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * tst_QProcess: Transform loop into additional test rowsJoerg Bornemann2016-02-241-9/+18
| | | | | | | | | | | | | | | | | | | | Do not use a loop to execute similar but separate tests in tst_QProcess::softExitInSlots. Use separate test rows with distinguishable data tags instead. This way we can deduce from CI output which part of this test failed. Change-Id: Ic9bc996f2ced11b2bb1c33c1970e64937d860976 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Stabilize tst_QProcess::softExitInSlots()Alex Trotsenko2016-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | After the commit 7ff655360f, case 4 in SoftExitProcess class relates to a channelReadyRead() signal instead of stateChanged(). Accordingly, terminateSlot() is fixed to handle a special case when process is not running. Change-Id: Ie0d3284f5d264037d00e4ad6d927c0766be562b0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Integrate QProcess into QIODevice's multistreaming infrastructureAlex Trotsenko2016-01-291-1/+7
| | | | | | | | | | | | | | | | As a result, this patch eliminates double-buffering in QProcess. Change-Id: I436faa4a5ffc28ce77f959dd6089bef400ac39f6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-2123-392/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | add a way to modify CreateProcess parametersJoerg Bornemann2015-12-101-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QProcess] Added method setCreateProcessArgumentsModifier to QProcess on Windows to enable users to intercept and modify CreateProcess parameters. With such a modifier, calling code can decide whether to inherit handles, modify the STARTUPINFO struct, and pass its own combination of process flags to CreateProcess. Task-number: QTBUG-390 Task-number: QTBUG-6917 Task-number: QTBUG-9350 Task-number: QTBUG-24619 Change-Id: I14757dbbacfebb1c89f52402d36fba0ba9c45f3a Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-11-271-27/+25
|\| | | | | | | Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
| * tst_QProcess: Use a QTemporaryDir for files to be created.Friedemann Kleint2015-11-261-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | Ensure the test works in a working directory with read-only permission and that the file names are unique. The test can then be executed repeatedly by COIN even in case left-over hanging process helpers still lock the files. Also disambiguate the "data" files used by various tests. Task-number: QTBUG-47370 Change-Id: I3b9c7b70828da78f400196fcbba27bc61ea4538f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| * tst_QProcess: Remove macro QPROCESS_VERIFY().Friedemann Kleint2015-11-251-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was used to verify waitForFinished() and printed QProcess::errorString() on failure, which is misleading, since the process is not in an error state - it is still running. Example: QWARN : tst_QProcess::setStandardOutputFileAndWaitForBytesWritten() QProcess error: 5: Unknown error FAIL! : tst_QProcess::setStandardOutputFileAndWaitForBytesWritten() 'ret' returned FALSE. () Use a plain QVERIFY instead. Task-number: QTBUG-47370 Change-Id: Iacfa6e1a5ffd2be4e1257a27a400ccc59671e8c8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-145-215/+284
|\| | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
| * MSVC2015: Blacklist tests reading from stdin in buffered/text mode.Friedemann Kleint2015-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - tst_QProcess::fileWriterProcess() - tst_QProcess::readLineStdin() - [tst_QProcess::readLineStdin_lineByLine() The test fails apparently due to a bug in its runtime library (fread() dropping data). Task-number: QTBUG-48455 Task-number: QTBUG-48504 Change-Id: I972e560e88312cea0d3dbcea9450c59285a15d5a Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * tst_qprocess: Improve handling of helpers.Friedemann Kleint2015-09-304-17/+99
| | | | | | | | | | | | | | | | | | | | | | Verify exit status and code where applicable. Avoid unnecessary data conversions in fileWriterProcess. Improve error handling in helper processes. Task-number: QTBUG-47370 Task-number: QTBUG-48455 Change-Id: Ib5c4f546027131db02caaa05154a5880edac5cf7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_qprocess: Instantiate QProcess objects on the stack.Friedemann Kleint2015-09-251-165/+141
| | | | | | | | | | | | | | | | | | | | | | | | Instantiate the QProcess object on the stack to ensure resource cleanup and remove the QProcess * member variable. Use qobject_cast<QProcess *>(QObject::sender()) instead of the member variable in the helpers slots to ensure that signals from a leaked QProcess do not interfere with other tests. Task-number: QTBUG-47370 Change-Id: Ifc0dccb7e4b18069d236df53bccdcb6a47df6346 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * tst_qprocess: Port to Qt 5 connection syntax.Friedemann Kleint2015-09-251-46/+54
| | | | | | | | | | | | Task-number: QTBUG-47370 Change-Id: I09489a6fb4598238fa5e0120bf751fe5af6f31af Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>