summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-05-19 04:02:17 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-05-19 04:02:17 (GMT)
commit2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315 (patch)
tree9eaf0842a9cd6f719e2d64866b806a84f57f8e1e /tests/auto
parent730bfd80804899771b39998c5b67e604d2192ecd (diff)
parentdcfe68f66e5162f9f7a05552aa1133cdc1f0f9c3 (diff)
downloadQt-2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315.zip
Qt-2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315.tar.gz
Qt-2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315.tar.bz2
Merge remote branch 'origin/4.6' into 4.7-from-4.6
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/compilerwarnings/tst_compilerwarnings.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
index f910a18..82c327a 100644
--- a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
+++ b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
@@ -62,6 +62,9 @@ class tst_CompilerWarnings: public QObject
private slots:
void warnings_data();
void warnings();
+
+private:
+ bool shouldIgnoreWarning(QString const&);
};
#if 0
@@ -242,16 +245,37 @@ void tst_CompilerWarnings::warnings()
if (!errs.isEmpty()) {
errList = errs.split("\n");
qDebug() << "Arguments:" << args;
- foreach (QString err, errList) {
- qDebug() << err;
+ QStringList validErrors;
+ foreach (QString const& err, errList) {
+ bool ignore = shouldIgnoreWarning(err);
+ qDebug() << err << (ignore ? " [ignored]" : "");
+ if (!ignore) {
+ validErrors << err;
+ }
}
+ errList = validErrors;
}
QCOMPARE(errList.count(), 0); // verbose info how many lines of errors in output
- QVERIFY(errs.isEmpty());
tmpQSourceFile.remove();
}
+bool tst_CompilerWarnings::shouldIgnoreWarning(QString const& warning)
+{
+ if (warning.isEmpty()) {
+ return true;
+ }
+
+ // icecc outputs warnings if some icecc node breaks
+ if (warning.startsWith("ICECC[")) {
+ return true;
+ }
+
+ // Add more bogus warnings here
+
+ return false;
+}
+
QTEST_APPLESS_MAIN(tst_CompilerWarnings)
#include "tst_compilerwarnings.moc"