Commit ae34bfd6 authored by hjk's avatar hjk

Debugger: Remove support for non-python GDB from auto tests

Change-Id: I07a6e7bfbdb14d23d7414eb1b09f1dd14854c902
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 1e7c3abe
...@@ -718,7 +718,6 @@ private: ...@@ -718,7 +718,6 @@ private:
QByteArray m_debuggerBinary; QByteArray m_debuggerBinary;
QByteArray m_qmakeBinary; QByteArray m_qmakeBinary;
QProcessEnvironment m_env; QProcessEnvironment m_env;
bool m_usePython;
DebuggerEngine m_debuggerEngine; DebuggerEngine m_debuggerEngine;
QString m_makeBinary; QString m_makeBinary;
bool m_keepTemp; bool m_keepTemp;
...@@ -769,9 +768,10 @@ void tst_Dumpers::initTestCase() ...@@ -769,9 +768,10 @@ void tst_Dumpers::initTestCase()
QVERIFY(ok); QVERIFY(ok);
QByteArray output = debugger.readAllStandardOutput(); QByteArray output = debugger.readAllStandardOutput();
//qDebug() << "stdout: " << output; //qDebug() << "stdout: " << output;
m_usePython = !output.contains("Python scripting is not supported in this copy of GDB"); bool usePython = !output.contains("Python scripting is not supported in this copy of GDB");
qDebug() << "Python : " << (m_usePython ? "ok" : "*** not ok ***"); qDebug() << "Python : " << (usePython ? "ok" : "*** not ok ***");
qDebug() << "Dumper dir : " << DUMPERDIR; qDebug() << "Dumper dir : " << DUMPERDIR;
QVERIFY(usePython);
QString version = QString::fromLocal8Bit(output); QString version = QString::fromLocal8Bit(output);
int pos1 = version.indexOf(QLatin1String("&\"show version\\n")); int pos1 = version.indexOf(QLatin1String("&\"show version\\n"));
...@@ -789,7 +789,6 @@ void tst_Dumpers::initTestCase() ...@@ -789,7 +789,6 @@ void tst_Dumpers::initTestCase()
} else if (m_debuggerEngine == DumpTestCdbEngine) { } else if (m_debuggerEngine == DumpTestCdbEngine) {
setupCdb(&m_makeBinary, &m_env); setupCdb(&m_makeBinary, &m_env);
} else if (m_debuggerEngine == DumpTestLldbEngine) { } else if (m_debuggerEngine == DumpTestLldbEngine) {
m_usePython = true;
QProcess debugger; QProcess debugger;
QString cmd = QString::fromUtf8(m_debuggerBinary + " -v"); QString cmd = QString::fromUtf8(m_debuggerBinary + " -v");
debugger.start(cmd); debugger.start(cmd);
...@@ -1057,22 +1056,13 @@ void tst_Dumpers::dumper() ...@@ -1057,22 +1056,13 @@ void tst_Dumpers::dumper()
"set print object on\n" "set print object on\n"
"set auto-load python-scripts no\n"; "set auto-load python-scripts no\n";
if (m_usePython) { cmds += "python sys.path.insert(1, '" + dumperDir + "')\n"
cmds += "python sys.path.insert(1, '" + dumperDir + "')\n" "python sys.path.append('" + uninstalledData + "')\n"
"python sys.path.append('" + uninstalledData + "')\n" "python from gdbbridge import *\n"
"python from gdbbridge import *\n" "run " + nograb + "\n"
"run " + nograb + "\n" "python print('@%sS@%s@' % ('N', theDumper.qtNamespace()))\n"
"python print('@%sS@%s@' % ('N', theDumper.qtNamespace()))\n" "bb options:fancy,autoderef,dyntype,pe vars: expanded:" + expanded + " typeformats:\n";
"bb options:fancy,autoderef,dyntype,pe vars: expanded:" + expanded + " typeformats:\n";
} else {
cmds += "run\n";
foreach (const Check &check, data.checks) {
QByteArray iname = check.iname;
//qDebug() << "INAME: " << iname;
cmds += "-var-create " + iname + " * "
+ check.expectedName.name + "\n";
}
}
cmds += "quit\n"; cmds += "quit\n";
} else if (m_debuggerEngine == DumpTestCdbEngine) { } else if (m_debuggerEngine == DumpTestCdbEngine) {
......
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