From 760f99bfa8bc964fe22bae5e4602e41208ab903c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 4 May 2023 14:02:41 +0200 Subject: [PATCH] test: Don't remove macdeployqt test directory when debugging test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.5 Change-Id: If0e6f836638d8ddb6b0d6c2be6ae4dd09b76eb7a Reviewed-by: Morten Johan Sørvig --- tests/auto/tools/macdeployqt/tst_macdeployqt.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp b/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp index c27091efad..40a142c96d 100644 --- a/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp +++ b/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp @@ -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