From: Friedemann Kleint Date: Mon, 27 Jul 2015 10:20:44 +0000 (+0200) Subject: Prospective fix to make lupdate tests pass. X-Git-Tag: v5.5.90+alpha1~6^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e3375a9eb63383615536a3faae15102f93b451e;p=platform%2Fupstream%2Fqttools.git Prospective fix to make lupdate tests pass. Suppress the qmake message about creating a .stash file. This should fix failures like: FAIL! : tst_lupdate::good(heuristics) Output for /Users/qt/work/qt/qttools/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt does not meet expectations: <<<<<<< got Info: creating stash file /Users/qt/work/qt/qttools/tests/auto/linguist/lupdate/testdata/good/heuristics/.qmake.stash ========= >>>>>>> expected Change-Id: I1f7737e7f8463fcd92a4faf7f87a484de72d0921 Reviewed-by: Joerg Bornemann --- diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 4138c64..0435576 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -60,7 +60,7 @@ private: QString m_cmdLupdate; QString m_basePath; - void doCompare(const QStringList &actual, const QString &expectedFn, bool err); + void doCompare(QStringList actual, const QString &expectedFn, bool err); void doCompare(const QString &actualFn, const QString &expectedFn, bool err); }; @@ -114,12 +114,17 @@ static bool prepareMatch(const QString &expect, QString *tmpl, int *require, int return true; } -void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn, bool err) +void tst_lupdate::doCompare(QStringList actual, const QString &expectedFn, bool err) { QFile file(expectedFn); QVERIFY2(file.open(QIODevice::ReadOnly | QIODevice::Text), qPrintable(expectedFn)); QStringList expected = QString(file.readAll()).split('\n'); + for (int i = actual.size() - 1; i >= 0; --i) { + if (actual.at(i).startsWith(QLatin1String("Info: creating stash file "))) + actual.removeAt(i); + } + int ei = 0, ai = 0, em = expected.size(), am = actual.size(); int oei = 0, oai = 0, oem = em, oam = am; int require = 0, accept = 0;