tst_qt_cmake_create: Skip test if CMake is not found

Change-Id: Ifd84135c756d5140bea1952e069f82854afe1ecd
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 4cb492e14a31b6497b81bfbbcbec09f94595698a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2024-06-16 18:50:55 +02:00 committed by Qt Cherry-pick Bot
parent 4afbfa8626
commit f399eff35e

View File

@ -42,12 +42,17 @@ void tst_qt_cmake_create::initTestCase()
#ifdef Q_OS_WINDOWS
m_shell = QString("cmd.exe");
m_cmd = QString("%1/qt-cmake-create.bat").arg(binpath);
const QString cmake = QStandardPaths::findExecutable("cmake.exe");
#else
m_shell = QString("/bin/sh");
m_cmd = QString("%1/qt-cmake-create").arg(binpath);
QVERIFY(QFile::exists(m_shell));
const QString cmake = QStandardPaths::findExecutable("cmake");
#endif
if (cmake.isEmpty())
QSKIP("CMake not found");
QVERIFY(QFile::exists(m_cmd));
}