Skip some build system tests if Xcode is not installed
We rely on a valid Xcode (command line tools) installation to run qmake. Change-Id: I8d6746942507680dd585a41f32cbe4e4d34822e4 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 06b33134b38ffabdf0c0d80c2c3b9581294ff715) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
92071fc0b1
commit
eb397a2ce9
@ -224,6 +224,9 @@ void tst_macdeployqt::initTestCase()
|
|||||||
QSKIP("This test requires QProcess support");
|
QSKIP("This test requires QProcess support");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (QProcess::execute("xcode-select", { "-p" }) != 0)
|
||||||
|
QSKIP("Xcode or Xcode command line tools not installed");
|
||||||
|
|
||||||
// Set up test-global unique temporary directory
|
// Set up test-global unique temporary directory
|
||||||
g_temporaryDirectory = new QTemporaryDir();
|
g_temporaryDirectory = new QTemporaryDir();
|
||||||
g_temporaryDirectory->setAutoRemove(!lcTests().isDebugEnabled());
|
g_temporaryDirectory->setAutoRemove(!lcTests().isDebugEnabled());
|
||||||
|
@ -93,6 +93,11 @@ static void copyDir(const QString &sourceDirPath, const QString &targetDirPath)
|
|||||||
|
|
||||||
void tst_qmake::initTestCase()
|
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()));
|
QVERIFY2(tempWorkDir.isValid(), qPrintable(tempWorkDir.errorString()));
|
||||||
QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath);
|
QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath);
|
||||||
QString cmd = QString("%1/qmake").arg(binpath);
|
QString cmd = QString("%1/qmake").arg(binpath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user