diff --git a/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp b/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp index 3c17acda56d..d408554319d 100644 --- a/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp +++ b/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp @@ -224,6 +224,9 @@ void tst_macdeployqt::initTestCase() QSKIP("This test requires QProcess support"); #endif + if (QProcess::execute("xcode-select", { "-p" }) != 0) + QSKIP("Xcode or Xcode command line tools not installed"); + // Set up test-global unique temporary directory g_temporaryDirectory = new QTemporaryDir(); g_temporaryDirectory->setAutoRemove(!lcTests().isDebugEnabled()); diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index a32b4ab228c..278cf4ad232 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -93,6 +93,11 @@ static void copyDir(const QString &sourceDirPath, const QString &targetDirPath) void tst_qmake::initTestCase() { +#if defined(Q_OS_APPLE) + if (QProcess::execute("xcode-select", { "-p" }) != 0) + QSKIP("Xcode or Xcode command line tools not installed"); +#endif + QVERIFY2(tempWorkDir.isValid(), qPrintable(tempWorkDir.errorString())); QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); QString cmd = QString("%1/qmake").arg(binpath);