Commit 780c21a1 authored by hjk's avatar hjk

Debugger: Make autotests runnable with MinGW

Change-Id: I0bdeadbad547b8351f3e1521c269e882a46edcb9
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 042c176a
......@@ -8,8 +8,12 @@ conditions by using environment variables as follows:
QTC_QMAKE_PATH_FOR_TEST - path to a Qt version
QTC_MAKE_PATH_FOR_TEST - path to a "make".
Used for GDB only, defaults to "make" except on Windows,
where it defaults to "mingw32-make"
QTC_USE_GLIBCXXDEBUG_FOR_TEST - (0/1) to switch between GCC's
"normal" standard library, and the "debug" version
"normal" standard library, and the "debug" version
(this will add DEFINES += _GLIBCXX_DEBUG) to the .pro
(QTC_MSVC_ENV_BAT - to set up MSVC)
......
......@@ -811,7 +811,22 @@ void tst_Dumpers::initTestCase()
extractGdbVersion(version, &m_gdbVersion,
&m_gdbBuildVersion, &m_isMacGdb, &m_isQnxGdb);
m_env = QProcessEnvironment::systemEnvironment();
m_makeBinary = QLatin1String("make");
m_makeBinary = QString::fromLocal8Bit(qgetenv("QTC_MAKE_PATH_FOR_TEST"));
#ifdef Q_OS_WIN
if (m_makeBinary.isEmpty()) {
m_makeBinary = QLatin1String("mingw32-make");
// if qmake is not in PATH make sure the correct libs for inferior are prepended to PATH
if (m_qmakeBinary != "qmake") {
Utils::Environment env = Utils::Environment::systemEnvironment();
env.prependOrSetPath(QDir::toNativeSeparators(QFileInfo(QLatin1String(m_qmakeBinary)).absolutePath()));
m_env = env.toProcessEnvironment();
}
#else
if (m_makeBinary.isEmpty()) {
m_makeBinary = QLatin1String("make");
#endif
}
qDebug() << "Make path : " << m_makeBinary;
qDebug() << "Gdb version : " << m_gdbVersion;
} else if (m_debuggerEngine == CdbEngine) {
setupCdb(&m_makeBinary, &m_env);
......@@ -1081,7 +1096,11 @@ void tst_Dumpers::dumper()
QByteArray nograb = "-nograb";
cmds = "set confirm off\n"
#ifdef Q_OS_WIN
"file debug/doit\n"
#else
"file doit\n"
#endif
"set print object on\n"
"set auto-load python-scripts off\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment