Commit 378f03ee authored by Milian Wolff's avatar Milian Wolff
Browse files

try to fix test_gdb::testStack on the CI

Apparently we end up in either the same line of the previous call
or the line of the next call when we step out. I guess this depends
on the version of GCC/Clang or GDB that's used. Allow both scenarios.
parent e3c732ca
......@@ -839,7 +839,13 @@ void GdbTest::testStack()
QCOMPARE(stackModel->rowCount(tIdx), 1);
COMPARE_DATA(stackModel->index(0, 0, tIdx), "0");
COMPARE_DATA(stackModel->index(0, 1, tIdx), "main");
COMPARE_DATA(stackModel->index(0, 2, tIdx), debugeeFileName+":31");
// depending on the compiler and gdb version, we may either end up in
// one line or the other
const auto last = stackModel->index(0, 2, tIdx).data().toString();
if (last.endsWith(":30"))
QCOMPARE(last, debugeeFileName + ":30");
QCOMPARE(last, debugeeFileName + ":31");
WAIT_FOR_STATE(session, DebugSession::PausedState);
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