Skip to content

Various fixes for unit tests on macOS

Alex Richardson requested to merge arichardson/kcoreaddons:macos-fixes into master

Work around infinite sleep in KProcess::execute() on macOS

When running KPtyProcessTest::test_ctty() on macOS we freeze forever calling poll() inside the QProcess implementation. Adding a call to QCoreApplication::processEvents(); between the kill() and waitForFinished() calls appears to reliably fix this freeze for me.


Fix KProcessTest on macOS

The helper was being built as an app bundle so we were trying to execute the .app directory instead of the actual binary. Fix this by using the ECM macros to mark all test binaries as non-GUI.

Edited by Alex Richardson

Merge request reports