summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qresourceengine/compressed.qrc5
-rwxr-xr-xtests/auto/corelib/io/qresourceengine/generateResources.sh7
-rw-r--r--tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro5
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp82
-rw-r--r--tests/auto/corelib/io/qresourceengine/uncompressed.rccbin0 -> 16478 bytes
-rw-r--r--tests/auto/corelib/io/qresourceengine/zlib.rccbin0 -> 137 bytes
-rw-r--r--tests/auto/corelib/io/qresourceengine/zstd.rccbin0 -> 112 bytes
-rw-r--r--tests/auto/corelib/time/qdate/tst_qdate.cpp39
-rw-r--r--tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp36
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp3
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp3
-rw-r--r--tests/auto/network/network.pro1
-rw-r--r--tests/auto/network/selftest/selftest.pro6
-rw-r--r--tests/auto/network/selftest/tst_networkselftest.cpp55
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp3
-rw-r--r--tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp3
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp3
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp3
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp3
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp3
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp3
-rw-r--r--tests/auto/tools/uic/baseline/config.ui.py4
-rw-r--r--tests/auto/widgets/itemviews/qtableview/BLACKLIST2
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST9
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST2
-rw-r--r--tests/auto/widgets/widgets/qmenu/BLACKLIST2
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp4
27 files changed, 245 insertions, 41 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/compressed.qrc b/tests/auto/corelib/io/qresourceengine/compressed.qrc
new file mode 100644
index 0000000000..f7c7cbc20f
--- /dev/null
+++ b/tests/auto/corelib/io/qresourceengine/compressed.qrc
@@ -0,0 +1,5 @@
+<RCC version="1.0">
+ <qresource>
+ <file>zero.txt</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/corelib/io/qresourceengine/generateResources.sh b/tests/auto/corelib/io/qresourceengine/generateResources.sh
new file mode 100755
index 0000000000..9894f6bfb7
--- /dev/null
+++ b/tests/auto/corelib/io/qresourceengine/generateResources.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+count=`awk '/ZERO_FILE_LEN/ { print $3 }' tst_qresourceengine.cpp`
+dd if=/dev/zero of=zero.txt bs=1 count=$count
+rcc --binary -o uncompressed.rcc --no-compress compressed.qrc
+rcc --binary -o zlib.rcc --compress-algo zlib --compress 9 compressed.qrc
+rcc --binary -o zstd.rcc --compress-algo zstd --compress 19 compressed.qrc
+rm zero.txt
diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro
index f523116cc9..345e3d13b9 100644
--- a/tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro
+++ b/tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
TARGET = tst_qresourceengine
-QT = core testlib
+QT = core-private testlib
SOURCES = tst_qresourceengine.cpp
RESOURCES += testqrc/test.qrc
@@ -15,7 +15,8 @@ QMAKE_DISTCLEAN += $${runtime_resource.target}
TESTDATA += \
parentdir.txt \
- testqrc/*
+ testqrc/* \
+ *.rcc
GENERATED_TESTDATA = $${runtime_resource.target}
android:!android-embedded {
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index bdbc1c6928..902e6db12a 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -27,9 +27,10 @@
**
****************************************************************************/
-
#include <QtTest/QtTest>
#include <QtCore/QCoreApplication>
+#include <QtCore/QScopeGuard>
+#include <QtCore/private/qglobal_p.h>
class tst_QResourceEngine: public QObject
{
@@ -50,6 +51,8 @@ private slots:
void checkUnregisterResource_data();
void checkUnregisterResource();
+ void compressedResource_data();
+ void compressedResource();
void checkStructure_data();
void checkStructure();
void searchPath_data();
@@ -105,6 +108,75 @@ void tst_QResourceEngine::cleanupTestCase()
QVERIFY(QResource::unregisterResource(m_runtimeResourceRcc, "/secondary_root/"));
}
+void tst_QResourceEngine::compressedResource_data()
+{
+ QTest::addColumn<QString>("fileName");
+ QTest::addColumn<int>("compressionAlgo");
+ QTest::addColumn<bool>("supported");
+
+ QTest::newRow("uncompressed")
+ << QFINDTESTDATA("uncompressed.rcc") << int(QResource::NoCompression) << true;
+ QTest::newRow("zlib")
+ << QFINDTESTDATA("zlib.rcc") << int(QResource::ZlibCompression) << true;
+ QTest::newRow("zstd")
+ << QFINDTESTDATA("zstd.rcc") << int(QResource::ZstdCompression) << QT_CONFIG(zstd);
+}
+
+// Note: generateResource.sh parses this line. Make sure it's a simple number.
+#define ZERO_FILE_LEN 16384
+// End note
+void tst_QResourceEngine::compressedResource()
+{
+ QFETCH(QString, fileName);
+ QFETCH(int, compressionAlgo);
+ QFETCH(bool, supported);
+ const QByteArray expectedData(ZERO_FILE_LEN, '\0');
+
+ QVERIFY(!QResource("zero.txt").isValid());
+ QCOMPARE(QResource::registerResource(fileName), supported);
+ if (!supported)
+ return;
+
+ auto unregister = qScopeGuard([=] { QResource::unregisterResource(fileName); });
+
+ QResource resource("zero.txt");
+ QVERIFY(resource.isValid());
+ QVERIFY(resource.size() > 0);
+ QVERIFY(resource.data());
+ QCOMPARE(resource.compressionAlgorithm(), QResource::Compression(compressionAlgo));
+
+ if (compressionAlgo == QResource::NoCompression) {
+ QCOMPARE(resource.size(), ZERO_FILE_LEN);
+ QCOMPARE(memcmp(resource.data(), expectedData.data(), ZERO_FILE_LEN), 0);
+
+ // API guarantees it will be QByteArray::fromRawData:
+ QCOMPARE(static_cast<const void *>(resource.uncompressedData().constData()),
+ static_cast<const void *>(resource.data()));
+ } else {
+ // reasonable expectation:
+ QVERIFY(resource.size() < ZERO_FILE_LEN);
+ }
+
+ // using the engine
+ QFile f(":/zero.txt");
+ QVERIFY(f.exists());
+ QVERIFY(f.open(QIODevice::ReadOnly));
+
+ // verify that we can decompress correctly
+ QCOMPARE(resource.uncompressedSize(), ZERO_FILE_LEN);
+ QCOMPARE(f.size(), ZERO_FILE_LEN);
+
+ QByteArray data = resource.uncompressedData();
+ QCOMPARE(data.size(), expectedData.size());
+ QCOMPARE(data, expectedData);
+
+ // decompression through the engine
+ data = f.readAll();
+ QCOMPARE(data.size(), expectedData.size());
+ QCOMPARE(data, expectedData);
+}
+
+
void tst_QResourceEngine::checkStructure_data()
{
QTest::addColumn<QString>("pathName");
@@ -140,7 +212,13 @@ void tst_QResourceEngine::checkStructure_data()
<< "parentdir.txt"
<< "runtime_resource.rcc"
#endif
- << "search_file.txt")
+ << "search_file.txt"
+#if defined(BUILTIN_TESTDATA)
+ << "uncompressed.rcc"
+ << "zlib.rcc"
+ << "zstd.rcc"
+#endif
+ )
<< rootContents
<< QLocale::c()
<< qlonglong(0);
diff --git a/tests/auto/corelib/io/qresourceengine/uncompressed.rcc b/tests/auto/corelib/io/qresourceengine/uncompressed.rcc
new file mode 100644
index 0000000000..4b009f73d5
--- /dev/null
+++ b/tests/auto/corelib/io/qresourceengine/uncompressed.rcc
Binary files differ
diff --git a/tests/auto/corelib/io/qresourceengine/zlib.rcc b/tests/auto/corelib/io/qresourceengine/zlib.rcc
new file mode 100644
index 0000000000..66f79fa630
--- /dev/null
+++ b/tests/auto/corelib/io/qresourceengine/zlib.rcc
Binary files differ
diff --git a/tests/auto/corelib/io/qresourceengine/zstd.rcc b/tests/auto/corelib/io/qresourceengine/zstd.rcc
new file mode 100644
index 0000000000..672fa05d14
--- /dev/null
+++ b/tests/auto/corelib/io/qresourceengine/zstd.rcc
Binary files differ
diff --git a/tests/auto/corelib/time/qdate/tst_qdate.cpp b/tests/auto/corelib/time/qdate/tst_qdate.cpp
index dd2cb3eea8..567209dcf6 100644
--- a/tests/auto/corelib/time/qdate/tst_qdate.cpp
+++ b/tests/auto/corelib/time/qdate/tst_qdate.cpp
@@ -88,7 +88,7 @@ private slots:
void toStringDateFormat();
void isLeapYear();
void yearsZeroToNinetyNine();
- void negativeYear() const;
+ void printNegativeYear_data() const;
void printNegativeYear() const;
void roundtripGermanLocale() const;
#if QT_CONFIG(textdate) && QT_DEPRECATED_SINCE(5, 10)
@@ -1458,33 +1458,28 @@ void tst_QDate::yearsZeroToNinetyNine()
}
}
-
-void tst_QDate::negativeYear() const
+void tst_QDate::printNegativeYear_data() const
{
- QDate y(-20, 3, 4);
- QVERIFY(y.isValid());
- QCOMPARE(y.year(), -20);
+ QTest::addColumn<int>("year");
+ QTest::addColumn<QString>("expect");
+ QTest::newRow("millennium") << -1000 << QStringLiteral("-1000");
+ QTest::newRow("century") << -500 << QStringLiteral("-0500");
+ QTest::newRow("decade") << -20 << QStringLiteral("-0020");
+ QTest::newRow("year") << -7 << QStringLiteral("-0007");
}
void tst_QDate::printNegativeYear() const
{
- {
- QDate date(-500, 3, 4);
- QVERIFY(date.isValid());
- QCOMPARE(date.toString(QLatin1String("yyyy")), QString::fromLatin1("-0500"));
- }
-
- {
- QDate date(-10, 3, 4);
- QVERIFY(date.isValid());
- QCOMPARE(date.toString(QLatin1String("yyyy")), QString::fromLatin1("-0010"));
- }
+ QFETCH(int, year);
+ QFETCH(QString, expect);
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ expect.replace(QLatin1Char('-'), QLocale().negativeSign());
+#endif
- {
- QDate date(-2, 3, 4);
- QVERIFY(date.isValid());
- QCOMPARE(date.toString(QLatin1String("yyyy")), QString::fromLatin1("-0002"));
- }
+ QDate date(year, 3, 4);
+ QVERIFY(date.isValid());
+ QCOMPARE(date.year(), year);
+ QCOMPARE(date.toString(QLatin1String("yyyy")), expect);
}
void tst_QDate::roundtripGermanLocale() const
diff --git a/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp b/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp
index 2f0b877799..39a1370f6f 100644
--- a/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp
+++ b/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp
@@ -55,12 +55,13 @@ private slots:
void thematicBreaks();
void lists_data();
void lists();
+ void avoidBlankLineAtBeginning_data();
+ void avoidBlankLineAtBeginning();
};
void tst_QTextMarkdownImporter::headingBulletsContinuations()
{
const QStringList expectedBlocks = QStringList() <<
- "" << // we could do without this blank line before the heading, but currently it happens
"heading" <<
"bullet 1 continuation line 1, indented via tab" <<
"bullet 2 continuation line 2, indented via 4 spaces" <<
@@ -222,5 +223,38 @@ void tst_QTextMarkdownImporter::lists()
QCOMPARE(doc.toMarkdown(), rewrite);
}
+void tst_QTextMarkdownImporter::avoidBlankLineAtBeginning_data()
+{
+ QTest::addColumn<QString>("input");
+ QTest::addColumn<int>("expectedNumberOfParagraphs");
+
+ QTest::newRow("Text block") << QString("Markdown text") << 1;
+ QTest::newRow("Headline") << QString("Markdown text\n============") << 1;
+ QTest::newRow("Code block") << QString(" Markdown text") << 2;
+ QTest::newRow("Unordered list") << QString("* Markdown text") << 1;
+ QTest::newRow("Ordered list") << QString("1. Markdown text") << 1;
+ QTest::newRow("Blockquote") << QString("> Markdown text") << 1;
+}
+
+void tst_QTextMarkdownImporter::avoidBlankLineAtBeginning() // QTBUG-81060
+{
+ QFETCH(QString, input);
+ QFETCH(int, expectedNumberOfParagraphs);
+
+ QTextDocument doc;
+ QTextMarkdownImporter(QTextMarkdownImporter::DialectGitHub).import(&doc, input);
+ QTextFrame::iterator iterator = doc.rootFrame()->begin();
+ int i = 0;
+ while (!iterator.atEnd()) {
+ QTextBlock block = iterator.currentBlock();
+ // Make sure there is no empty paragraph at the beginning of the document
+ if (i == 0)
+ QVERIFY(!block.text().isEmpty());
+ ++iterator;
+ ++i;
+ }
+ QCOMPARE(i, expectedNumberOfParagraphs);
+}
+
QTEST_MAIN(tst_QTextMarkdownImporter)
#include "tst_qtextmarkdownimporter.moc"
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index 2068738a67..60acb70af4 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -215,7 +215,8 @@ void tst_QFtp::initTestCase()
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::socksProxyServerName(), 1080));
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpProxyServerName(), 3128));
#else
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
#endif
#ifndef QT_NO_BEARERMANAGEMENT
QNetworkConfigurationManager manager;
diff --git a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index 0a9320118d..57fa5a613c 100644
--- a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -105,7 +105,8 @@ void tst_QHttpNetworkConnection::initTestCase()
#if defined(QT_TEST_SERVER)
QVERIFY(QtNetworkSettings::verifyConnection(httpServerName(), 80));
#else
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
#endif
}
diff --git a/tests/auto/network/network.pro b/tests/auto/network/network.pro
index 64262a8632..9a3ababe61 100644
--- a/tests/auto/network/network.pro
+++ b/tests/auto/network/network.pro
@@ -1,5 +1,6 @@
TEMPLATE=subdirs
SUBDIRS=\
+ selftest \
access \
bearer \
kernel \
diff --git a/tests/auto/network/selftest/selftest.pro b/tests/auto/network/selftest/selftest.pro
new file mode 100644
index 0000000000..e8312032c3
--- /dev/null
+++ b/tests/auto/network/selftest/selftest.pro
@@ -0,0 +1,6 @@
+CONFIG += testcase
+TARGET = tst_networkselftest
+SOURCES += tst_networkselftest.cpp
+
+requires(qtConfig(private_tests))
+QT = core network network-private testlib
diff --git a/tests/auto/network/selftest/tst_networkselftest.cpp b/tests/auto/network/selftest/tst_networkselftest.cpp
new file mode 100644
index 0000000000..a540e18f48
--- /dev/null
+++ b/tests/auto/network/selftest/tst_networkselftest.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+
+#include "../../network-settings.h"
+
+class tst_NetworkSelftest : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testServerIsAvailableInCI();
+};
+
+void tst_NetworkSelftest::testServerIsAvailableInCI()
+{
+ if (!qEnvironmentVariable("QTEST_ENVIRONMENT").split(' ').contains("ci"))
+ QSKIP("Not running in the CI");
+
+#if !defined(QT_TEST_SERVER)
+ QVERIFY2(QtNetworkSettings::verifyTestNetworkSettings(),
+ "Test server must be available when running in the CI");
+#endif
+}
+
+QTEST_MAIN(tst_NetworkSelftest)
+
+#include "tst_networkselftest.moc"
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
index ffc63ee46a..5be00630ca 100644
--- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
+++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
@@ -87,7 +87,8 @@ private slots:
void tst_PlatformSocketEngine::initTestCase()
{
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
}
//---------------------------------------------------------------------------
diff --git a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
index a3d93609c1..1931df3d07 100644
--- a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -129,7 +129,8 @@ void tst_QHttpSocketEngine::initTestCase()
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpServerName(), 80));
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::imapServerName(), 143));
#else
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
#endif
}
diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
index 8ac9f56de8..da9cdee691 100644
--- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -142,7 +142,8 @@ void tst_QSocks5SocketEngine::initTestCase()
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpServerName(), 80));
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::imapServerName(), 143));
#else
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
#endif
}
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 42efb465bd..9ab5e88900 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -358,7 +358,8 @@ void tst_QTcpSocket::initTestCase()
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::ftpServerName(), 21));
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::ftpProxyServerName(), 2121));
#else
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
#endif
}
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index bc289101bb..18b449a953 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -399,7 +399,8 @@ void tst_QSslSocket::initTestCase()
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::imapServerName(), 993));
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::echoServerName(), 13));
#else
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
#endif // QT_TEST_SERVER
#endif // QT_NO_SSL
}
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
index 3b28e7a803..ad9554c7a5 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
@@ -109,7 +109,8 @@ void tst_QSslSocket_onDemandCertificates_member::initTestCase()
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpProxyServerName(), 3129));
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpProxyServerName(), 3130));
#else
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
#endif // QT_TEST_SERVER
}
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
index a441d13619..b4a41b57e6 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
@@ -105,7 +105,8 @@ void tst_QSslSocket_onDemandCertificates_static::initTestCase()
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpProxyServerName(), 3129));
QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpProxyServerName(), 3130));
#else
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
#endif // QT_TEST_SERVER
}
diff --git a/tests/auto/tools/uic/baseline/config.ui.py b/tests/auto/tools/uic/baseline/config.ui.py
index f7e1ffc773..5fd558bb01 100644
--- a/tests/auto/tools/uic/baseline/config.ui.py
+++ b/tests/auto/tools/uic/baseline/config.ui.py
@@ -38,12 +38,12 @@
from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QFont,
+from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
from PySide2.QtWidgets import *
-import GammaView
+from gammaview import GammaView
class Ui_Config(object):
diff --git a/tests/auto/widgets/itemviews/qtableview/BLACKLIST b/tests/auto/widgets/itemviews/qtableview/BLACKLIST
index 9648cef3de..ff870915be 100644
--- a/tests/auto/widgets/itemviews/qtableview/BLACKLIST
+++ b/tests/auto/widgets/itemviews/qtableview/BLACKLIST
@@ -1,3 +1,5 @@
[moveCursorBiggerJump]
osx
+[mouseWheel:scroll down per pixel]
+macos
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST
index 26f9ce1b85..be19d8fd0b 100644
--- a/tests/auto/widgets/kernel/qwidget/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST
@@ -22,7 +22,7 @@ opensuse-leap
# QTBUG-68175
opensuse-42.3
[childEvents]
-osx ci
+macos
[renderInvisible]
osx-10.12
osx-10.11
@@ -34,8 +34,7 @@ osx
[render_systemClip]
osx
[showMinimizedKeepsFocus]
-osx-10.12 ci
-osx-10.13 ci
+macos
[maskedUpdate]
opensuse
opensuse-leap
@@ -49,3 +48,7 @@ ubuntu
# QTBUG-75270
winrt
+[syntheticEnterLeave]
+macos # Can't move cursor (QTBUG-76312)
+[taskQTBUG_4055_sendSyntheticEnterLeave]
+macos # Can't move cursor (QTBUG-76312)
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST b/tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST
index 6b2e4f3fb2..616cd650b3 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST
+++ b/tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST
@@ -1,2 +1,4 @@
[task232085_spinBoxLineEditBg]
osx
+[widgetStylePropagation]
+macos # QTBUG-75786
diff --git a/tests/auto/widgets/widgets/qmenu/BLACKLIST b/tests/auto/widgets/widgets/qmenu/BLACKLIST
index ad6d2f340c..ba9c184a67 100644
--- a/tests/auto/widgets/widgets/qmenu/BLACKLIST
+++ b/tests/auto/widgets/widgets/qmenu/BLACKLIST
@@ -11,3 +11,5 @@ osx-10.13
osx-10.14
[activeSubMenuPosition]
winrt
+[submenuTearOffDontClose]
+macos # Can't move cursor (QTBUG-76312)
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index 2d74c20469..207327f073 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -1066,6 +1066,10 @@ static inline QByteArray msgGeometryIntersects(const QRect &r1, const QRect &r2)
void tst_QMenu::pushButtonPopulateOnAboutToShow()
{
+#ifdef Q_OS_MACOS
+ QSKIP("Popup menus may partially overlap the button on macOS, and that's okey");
+#endif
+
QPushButton b("Test PushButton");
b.setWindowFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint);