summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-03-10 11:38:59 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-03-14 14:28:34 +0000
commit8864aca9e5a0b2fd727ffc010bc0e9a538f1546b (patch)
tree3bb5869b4530738be29fc7aa13bad33991b2d085 /tests/auto/testlib
parentb202ed3c31aa3299197c2fcd03d07bc7fc74d575 (diff)
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>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 35b8f226ec..9c23574456 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -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")) {