test: Don't remove macdeployqt test directory when debugging test

Pick-to: 6.5
Change-Id: If0e6f836638d8ddb6b0d6c2be6ae4dd09b76eb7a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Tor Arne Vestbø 2023-05-04 14:02:41 +02:00
parent e36082dcdc
commit 760f99bfa8

View File

@ -6,7 +6,6 @@
Q_LOGGING_CATEGORY(lcTests, "qt.tools.tests")
bool g_testDirectoryBuild = false; // toggle to keep build output for debugging.
QTemporaryDir *g_temporaryDirectory;
QString g_macdeployqtBinary;
QString g_qmakeBinary;
@ -108,8 +107,6 @@ QString sourcePath(const QString &name)
QString buildPath(const QString &name)
{
if (g_testDirectoryBuild)
return "build_" + name;
return g_temporaryDirectory->path() + "/build_" + name;
}
@ -229,6 +226,7 @@ void tst_macdeployqt::initTestCase()
// Set up test-global unique temporary directory
g_temporaryDirectory = new QTemporaryDir();
g_temporaryDirectory->setAutoRemove(!lcTests().isDebugEnabled());
QVERIFY(g_temporaryDirectory->isValid());
// Locate build and deployment tools