From 355105b7a2c7292fda88038a1f711e741bcc4218 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 30 Nov 2021 08:52:54 +0100 Subject: [PATCH] Tests: Fix setting up env for tests on Win ..when testing MinGW env inside a MSVC dumper tests. Amends 652b9844e6fab. Change-Id: I259e4392078628f6ec235291ac101bad973ff70d Reviewed-by: David Schulz --- tests/auto/debugger/tst_dumpers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 1accd1e7190..b58bfbaeb01 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -1224,10 +1224,10 @@ void tst_Dumpers::initTestCase() if (m_makeBinary.isEmpty()) m_makeBinary = "mingw32-make"; if (m_makeBinary != "mingw32-make") - env.prependOrSetPath(Utils::FilePath::fromString(m_makeBinary)); + env.prependOrSetPath(Utils::FilePath::fromString(m_makeBinary).parentDir()); // if qmake is not in PATH make sure the correct libs for inferior are prepended to PATH if (m_qmakeBinary != "qmake") - env.prependOrSetPath(Utils::FilePath::fromString(m_qmakeBinary)); + env.prependOrSetPath(Utils::FilePath::fromString(m_qmakeBinary).parentDir()); m_env = env.toProcessEnvironment(); #else m_env = QProcessEnvironment::systemEnvironment(); @@ -1248,7 +1248,7 @@ void tst_Dumpers::initTestCase() cdbextPath = QString(CDBEXT_PATH "\\qtcreatorcdbext64"); QVERIFY(QFile::exists(cdbextPath + "\\qtcreatorcdbext.dll")); env.set("_NT_DEBUGGER_EXTENSION_PATH", cdbextPath); - env.prependOrSetPath(Utils::FilePath::fromString(m_qmakeBinary)); + env.prependOrSetPath(Utils::FilePath::fromString(m_qmakeBinary).parentDir()); m_makeBinary = env.searchInPath("nmake.exe").toString(); m_env = env.toProcessEnvironment();