Make testlib selftests pass for shadow-builds

Using QFileInfo to check if the file exists based on the filename
alone ignores the fact that all the expected files are embedded
as QRC resources.

The expectedResult() function already does a similar check, so we
can use that directly instead of checking twice if the file exists.

Task-number: QTBUG-66981
Change-Id: I0beb8d3503ed49682ae7d7e2a5172922fab5420d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tor Arne Vestbø 2018-03-10 11:38:59 +01:00
parent b202ed3c31
commit 8864aca9e5

View File

@ -759,8 +759,8 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
QList<QByteArray> res = splitLines(actualOutputs[n]);
QString errorMessage;
QString expectedFileName = expectedFileNameFromTest(subdir, logger);
if (QFileInfo::exists(expectedFileName)) {
QByteArrayList exp = expectedResult(expectedFileName);
QByteArrayList exp = expectedResult(expectedFileName);
if (!exp.isEmpty()) {
#ifdef Q_CC_MINGW
// MinGW formats double numbers differently (last verified with 7.1)
if (n == 0 && subdir == QStringLiteral("float")) {