Commit 62941c7b authored by Christian Stenger's avatar Christian Stenger Committed by hjk

Tests: Fix parsing of gcc version on SuSE

Change-Id: Ieb8b5a1ea998abbd2d3baf13829f81f9d4cc43e5
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 53502d7c
......@@ -1067,8 +1067,15 @@ void tst_Dumpers::dumper()
if (pos != -1)
output = output.left(pos);
qDebug() << "Extracting GCC version from: " << output;
pos = output.lastIndexOf(' ');
output = output.mid(pos + 1);
if (output.contains(QByteArray("SUSE Linux"))) {
pos = output.indexOf(')');
output = output.mid(pos + 1).trimmed();
pos = output.indexOf(' ');
output = output.left(pos);
} else {
pos = output.lastIndexOf(' ');
output = output.mid(pos + 1);
}
int pos1 = output.indexOf('.');
int major = output.left(pos1++).toInt();
int pos2 = output.indexOf('.', pos1 + 1);
......
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