diff options
author | Christian Stenger <christian.stenger@qt.io> | 2021-03-11 09:51:52 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2021-03-11 09:05:04 +0000 |
commit | 2b5f7316ac1b2533d0ab6b2cc348e38e7d130a9e (patch) | |
tree | b2121b0799d50e0d5a4d81a4fd4f8ead2bbc4c5e | |
parent | 8ac091abf8df9a0648e94df4755382f25dbb852f (diff) |
Tests: Work around problems in execution of dumper tests
On several machines the QDir test interferes in a not yet known
way and makes all following tests fail. Moving it to the end
makes the problem vanish.
Change-Id: Ic8e7fdaaf9581be0cdd5666c7d2f12a2e8ed80ee
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 64fd5636661..8cf610bd281 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -2303,35 +2303,6 @@ void tst_Dumpers::dumper_data() // Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime") % Optional(); -#ifdef Q_OS_WIN - QString tempDir = "C:/Program Files"; -#else - QString tempDir = "/tmp"; -#endif - auto quoted = [](const QString &str) { return QString('"' + str + '"'); }; - - QTest::newRow("QDir") - << Data("#include <QDir>\n", - - "QDir dir(" + quoted(tempDir) + ");\n" - "QString s = dir.absolutePath();\n" - "QFileInfoList fil = dir.entryInfoList();\n" - "QFileInfo fi = fil.first();", - - "&dir, &s, &fi") - - + CoreProfile() - + QtVersion(0x50300) - - + Check("dir", quoted(tempDir), "@QDir") - // + Check("dir.canonicalPath", quoted(tempDir), "@QString") - + Check("dir.absolutePath", quoted(tempDir), "@QString") % Optional() - + Check("dir.entryInfoList.0", "[0]", quoted(tempDir + "/."), "@QFileInfo") % NoCdbEngine - + Check("dir.entryInfoList.1", "[1]", quoted(tempDir + "/.."), "@QFileInfo") % NoCdbEngine - + Check("dir.entryList.0", "[0]", "\".\"", "@QString") % NoCdbEngine - + Check("dir.entryList.1", "[1]", "\"..\"", "@QString") % NoCdbEngine; - - QTest::newRow("QFileInfo") #ifdef Q_OS_WIN << Data("#include <QFile>\n" @@ -8176,6 +8147,37 @@ void tst_Dumpers::dumper_data() + Check("x.2", "[2]", "3", "NI"); #endif #endif + + +/* FIXME for unknown reasons the following test must be the last one to not interfere with the + dumper tests and make all following fail */ +#ifdef Q_OS_WIN + QString tempDir = "C:/Program Files"; +#else + QString tempDir = "/tmp"; +#endif + auto quoted = [](const QString &str) { return QString('"' + str + '"'); }; + + QTest::newRow("QDir") + << Data("#include <QDir>\n", + + "QDir dir(" + quoted(tempDir) + ");\n" + "QString s = dir.absolutePath();\n" + "QFileInfoList fil = dir.entryInfoList();\n" + "QFileInfo fi = fil.first();", + + "&dir, &s, &fi") + + + CoreProfile() + + QtVersion(0x50300) + + + Check("dir", quoted(tempDir), "@QDir") + // + Check("dir.canonicalPath", quoted(tempDir), "@QString") + + Check("dir.absolutePath", quoted(tempDir), "@QString") % Optional() + + Check("dir.entryInfoList.0", "[0]", quoted(tempDir + "/."), "@QFileInfo") % NoCdbEngine + + Check("dir.entryInfoList.1", "[1]", quoted(tempDir + "/.."), "@QFileInfo") % NoCdbEngine + + Check("dir.entryList.0", "[0]", "\".\"", "@QString") % NoCdbEngine + + Check("dir.entryList.1", "[1]", "\"..\"", "@QString") % NoCdbEngine; } int main(int argc, char *argv[]) |