diff options
Diffstat (limited to 'tests/auto/tools/qmake/tst_qmake.cpp')
-rw-r--r-- | tests/auto/tools/qmake/tst_qmake.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index c03fb44791..278cf4ad23 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> @@ -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); @@ -124,7 +129,7 @@ void tst_qmake::initTestCase() QString testDataPath = QFINDTESTDATA(subProgram); if (!testDataPath.endsWith(subProgram)) QFAIL("Cannot find test data directory."); - testDataPath.chop(subProgram.length() - testDataSubDir.length()); + testDataPath.chop(subProgram.size() - testDataSubDir.size()); QString userWorkDir = qgetenv("TST_QMAKE_BUILD_DIR"); if (userWorkDir.isEmpty()) { |