summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSami Nurmenniemi <sami.nurmenniemi@qt.io>2018-06-13 16:35:40 +0300
committerSami Nurmenniemi <sami.nurmenniemi@qt.io>2018-11-26 07:06:59 +0000
commit71bd06d516a2410ae0ea698e79dcb94aba9bc5b4 (patch)
tree75ca3d56d9a02711bf20325a1507b157d5eb79c7 /tests
parentd8b401959f6f58bc80f767684b250dd4589735d6 (diff)
Make developer build tests pass for boot2qt
Some tests were fixed and others were skipped/blacklisted. Task-number: QTBUG-63152 Change-Id: Ica7df555f8d152ee589865911130525101d4b941 Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/global/qlogging/BLACKLIST4
-rw-r--r--tests/auto/corelib/io/qstandardpaths/BLACKLIST3
-rw-r--r--tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro3
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp6
-rw-r--r--tests/auto/corelib/serialization/qtextstream/test/test.pro2
-rw-r--r--tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp5
-rw-r--r--tests/auto/network/access/http2/http2.pro3
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp5
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp12
-rw-r--r--tests/auto/other/qobjectrace/qobjectrace.pro3
-rw-r--r--tests/auto/other/qobjectrace/tst_qobjectrace.cpp4
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp3
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp12
13 files changed, 59 insertions, 6 deletions
diff --git a/tests/auto/corelib/global/qlogging/BLACKLIST b/tests/auto/corelib/global/qlogging/BLACKLIST
index 1dcee92361..e474064f54 100644
--- a/tests/auto/corelib/global/qlogging/BLACKLIST
+++ b/tests/auto/corelib/global/qlogging/BLACKLIST
@@ -1,3 +1,7 @@
+[qMessagePattern:backtrace]
+# QTBUG-63915
+b2qt 64bit
+
[qMessagePattern:backtrace depth,separator]
# QTBUG-63915
b2qt 64bit
diff --git a/tests/auto/corelib/io/qstandardpaths/BLACKLIST b/tests/auto/corelib/io/qstandardpaths/BLACKLIST
deleted file mode 100644
index d5ee9650cd..0000000000
--- a/tests/auto/corelib/io/qstandardpaths/BLACKLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-[testFindExecutable]
-# QTBUG-64404
-b2qt 64bit
diff --git a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
index 9fd7047405..44b1ce8dd8 100644
--- a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
+++ b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
@@ -5,3 +5,6 @@ INCLUDEPATH += ../../../../shared/
HEADERS += ../../../../shared/emulationdetector.h
SOURCES = tst_qstandardpaths.cpp
TESTDATA += tst_qstandardpaths.cpp qstandardpaths.pro
+
+# QTBUG-64404
+boot2qt: DEFINES+=SKIP_FINDEXECUTABLE
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index 3de777653e..e316ce9acb 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -369,6 +369,12 @@ static inline QFileInfo findSh()
void tst_qstandardpaths::testFindExecutable_data()
{
+#ifdef SKIP_FINDEXECUTABLE
+ // Test needs to be skipped or Q_ASSERT below will cancel the test
+ // and report FAIL regardless of BLACKLIST contents
+ QSKIP("QTBUG-64404");
+#endif
+
QTest::addColumn<QString>("directory");
QTest::addColumn<QString>("needle");
QTest::addColumn<QString>("expected");
diff --git a/tests/auto/corelib/serialization/qtextstream/test/test.pro b/tests/auto/corelib/serialization/qtextstream/test/test.pro
index 3dcfa0b414..0f289a5ce1 100644
--- a/tests/auto/corelib/serialization/qtextstream/test/test.pro
+++ b/tests/auto/corelib/serialization/qtextstream/test/test.pro
@@ -3,6 +3,8 @@ TARGET = ../tst_qtextstream
QT = core network testlib
SOURCES = ../tst_qtextstream.cpp
RESOURCES += ../qtextstream.qrc
+INCLUDEPATH += ../../../../../shared/
+HEADERS += ../../../../../shared/emulationdetector.h
win32 {
CONFIG(debug, debug|release) {
diff --git a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
index df8746e518..77675b8e44 100644
--- a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
@@ -44,7 +44,7 @@
# include <QProcess>
#endif
#include "../../../network-settings.h"
-
+#include "emulationdetector.h"
QT_BEGIN_NAMESPACE
template<> struct QMetaTypeId<QIODevice::OpenModeFlag>
@@ -1459,6 +1459,9 @@ void tst_QTextStream::pos2()
// ------------------------------------------------------------------------------
void tst_QTextStream::pos3LargeFile()
{
+ if (EmulationDetector::isRunningArmOnX86())
+ QSKIP("Running QTextStream::pos() in tight loop is too slow on emulator");
+
{
QFile file(testFileName);
file.open(QIODevice::WriteOnly | QIODevice::Text);
diff --git a/tests/auto/network/access/http2/http2.pro b/tests/auto/network/access/http2/http2.pro
index e130f30784..b244a827bd 100644
--- a/tests/auto/network/access/http2/http2.pro
+++ b/tests/auto/network/access/http2/http2.pro
@@ -2,7 +2,8 @@ QT += core core-private network network-private testlib
CONFIG += testcase parallel_test c++11
TARGET = tst_http2
-HEADERS += http2srv.h
+INCLUDEPATH += ../../../../shared/
+HEADERS += http2srv.h ../../../../shared/emulationdetector.h
SOURCES += tst_http2.cpp http2srv.cpp
DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp
index ecf4c5814a..51e30804a3 100644
--- a/tests/auto/network/access/http2/tst_http2.cpp
+++ b/tests/auto/network/access/http2/tst_http2.cpp
@@ -48,6 +48,8 @@
#include <cstdlib>
#include <string>
+#include "emulationdetector.h"
+
#if !defined(QT_NO_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_TLSEXT)
// HTTP/2 over TLS requires ALPN/NPN to negotiate the protocol version.
const bool clearTextHTTP2 = false;
@@ -292,6 +294,9 @@ void tst_Http2::flowControlServerSide()
// to let all replies finish without any error.
using namespace Http2;
+ if (EmulationDetector::isRunningArmOnX86())
+ QSKIP("Test is too slow to run on emulator");
+
clearHTTP2State();
serverPort = 0;
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 263a475435..c473230246 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -2429,7 +2429,17 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
QString::fromLatin1("Could not start %1: %2").arg(processExe, serverProcess.errorString())));
while (!serverProcess.canReadLine())
QVERIFY(serverProcess.waitForReadyRead(10000));
- QCOMPARE(serverProcess.readLine().data(), QByteArray(server.toLatin1() + "\n").data());
+
+ QByteArray line = serverProcess.readLine();
+
+ // Ignore following print, happens on Qemu:
+ if (line == "getsockopt level=41 optname=26 not yet supported\n") {
+ while (!serverProcess.canReadLine())
+ QVERIFY(serverProcess.waitForReadyRead(10000));
+ line = serverProcess.readLine();
+ }
+
+ QCOMPARE(line.data(), QByteArray(server.toLatin1() + "\n").data());
// Start client
QProcess clientProcess;
diff --git a/tests/auto/other/qobjectrace/qobjectrace.pro b/tests/auto/other/qobjectrace/qobjectrace.pro
index 94e7928585..6536810534 100644
--- a/tests/auto/other/qobjectrace/qobjectrace.pro
+++ b/tests/auto/other/qobjectrace/qobjectrace.pro
@@ -2,3 +2,6 @@ CONFIG += testcase
SOURCES += tst_qobjectrace.cpp
QT = core testlib
+INCLUDEPATH += ../../../shared/
+HEADERS += ../../../shared/emulationdetector.h
+
diff --git a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
index e6eb51500b..0d656e223c 100644
--- a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
+++ b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
@@ -30,6 +30,7 @@
#include <QtCore>
#include <QtTest/QtTest>
+#include "emulationdetector.h"
enum { OneMinute = 60 * 1000,
TwoMinutes = OneMinute * 2 };
@@ -256,6 +257,9 @@ public:
void tst_QObjectRace::destroyRace()
{
+ if (EmulationDetector::isRunningArmOnX86())
+ QSKIP("Test is too slow to run on emulator");
+
enum { ThreadCount = 10, ObjectCountPerThread = 2777,
ObjectCount = ThreadCount * ObjectCountPerThread };
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 63e5721e7e..26e3ccd0fb 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -659,6 +659,9 @@ static inline QByteArray msgProcessError(const QString &binary, const QStringLis
void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& loggers, QStringList const& arguments, bool crashes)
{
+ if (EmulationDetector::isRunningArmOnX86() && (subdir == "crashes"))
+ QSKIP("Skipping \"crashes\" due to QTBUG-71915");
+
#if defined(__GNUC__) && defined(__i386) && defined(Q_OS_LINUX)
if (arguments.contains("-callgrind")) {
QProcess checkProcess;
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 7c1deb8fff..d5eef521ed 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -1671,6 +1671,13 @@ void tst_QComboBox::setCustomModelAndView()
QTRY_VERIFY(combo.view()->isVisible());
const QRect subItemRect = view->visualRect(model->indexFromItem(subItem));
QWidget *window = view->window();
+
+ // QComboBox sometimes ignores the mouse click event for doubleClickInterval
+ // depending on which tests have been run previously. On arm this happens
+ // more often than on x86. Search for maybeIgnoreMouseButtonRelease to see
+ // why this happens.
+ QTest::qWait(QApplication::doubleClickInterval());
+
QTest::mouseClick(window->windowHandle(), Qt::LeftButton, 0, view->mapTo(window, subItemRect.center()));
QTRY_COMPARE(combo.currentText(), subItem21Text);
}
@@ -3436,6 +3443,11 @@ void tst_QComboBox::task_QTBUG_52027_mapCompleterIndex()
model->setFilterFixedString("foobar1");
completer->setModel(model);
+ if (QGuiApplication::platformName() == "offscreen") {
+ QWARN("Offscreen platform requires explicit activateWindow()");
+ cbox.activateWindow();
+ }
+
QApplication::setActiveWindow(&cbox);
QVERIFY(QTest::qWaitForWindowActive(&cbox));