summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/BLACKLIST1
-rw-r--r--tests/auto/corelib/io/qdir/qdir.pro2
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp6
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp2
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp9
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp4
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp2
-rw-r--r--tests/auto/corelib/io/qiodevice/qiodevice.pro2
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp2
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp2
-rw-r--r--tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro2
-rw-r--r--tests/auto/corelib/io/qresourceengine/qresourceengine.pro2
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp6
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp2
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro2
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp8
-rw-r--r--tests/auto/corelib/kernel/qtranslator/qtranslator.pro2
-rw-r--r--tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp2
-rw-r--r--tests/auto/corelib/serialization/qdatastream/qdatastream.pro2
-rw-r--r--tests/auto/corelib/tools/qbytearray/qbytearray.pro2
-rw-r--r--tests/auto/corelib/tools/qchar/qchar.pro2
-rw-r--r--tests/auto/corelib/tools/qcollator/tst_qcollator.cpp2
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp6
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro2
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp1
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp15
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro2
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp14
-rw-r--r--tests/auto/gui/image/qimage/qimage.pro2
-rw-r--r--tests/auto/gui/image/qimagereader/qimagereader.pro2
-rw-r--r--tests/auto/gui/image/qimagewriter/qimagewriter.pro2
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST2
-rw-r--r--tests/auto/gui/painting/qpainter/qpainter.pro2
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp39
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp1
-rw-r--r--tests/auto/network/access/qnetworkreply/BLACKLIST3
-rw-r--r--tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp9
-rw-r--r--tests/auto/network/socket/qtcpsocket/BLACKLIST4
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp2
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp46
-rw-r--r--tests/auto/tools/qmakelib/tst_qmakelib.cpp97
-rw-r--r--tests/auto/tools/qmakelib/tst_qmakelib.h5
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/BLACKLIST2
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp6
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro2
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp13
-rw-r--r--tests/auto/widgets/kernel/qlayout/qlayout.pro2
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp2
-rw-r--r--tests/auto/widgets/styles/qstyle/qstyle.pro2
-rw-r--r--tests/auto/widgets/widgets/qmenubar/BLACKLIST3
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/BLACKLIST3
-rw-r--r--tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp84
54 files changed, 368 insertions, 79 deletions
diff --git a/tests/auto/concurrent/qtconcurrentmap/BLACKLIST b/tests/auto/concurrent/qtconcurrentmap/BLACKLIST
index 7cd8961f6f..0320f61fab 100644
--- a/tests/auto/concurrent/qtconcurrentmap/BLACKLIST
+++ b/tests/auto/concurrent/qtconcurrentmap/BLACKLIST
@@ -1,2 +1,3 @@
[qFutureAssignmentLeak]
ci opensuse
+ci ubuntu-16.04
diff --git a/tests/auto/corelib/io/qdir/qdir.pro b/tests/auto/corelib/io/qdir/qdir.pro
index 4870922312..2252e71cd8 100644
--- a/tests/auto/corelib/io/qdir/qdir.pro
+++ b/tests/auto/corelib/io/qdir/qdir.pro
@@ -8,6 +8,6 @@ TESTDATA += testdir testData searchdir resources entrylist types tst_qdir.cpp
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
-android {
+android:!android-embedded {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 8dbac28183..9d47bb2884 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -228,13 +228,13 @@ private:
Q_DECLARE_METATYPE(tst_QDir::UncHandling)
tst_QDir::tst_QDir()
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
: m_dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
#elif !defined(BUILTIN_TESTDATA)
: m_dataPath(QFileInfo(QFINDTESTDATA("testData")).absolutePath())
#endif
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QString resourceSourcePath = QStringLiteral(":/android_testdata/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -2186,7 +2186,7 @@ void tst_QDir::equalityOperator_data()
QString pathinroot(QDir::rootPath() + QLatin1String("assets/.."));
#elif defined (Q_OS_WIN)
QString pathinroot("c:/windows/..");
-#elif defined(Q_OS_ANDROID)
+#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QString pathinroot("/system/..");
#elif defined(Q_OS_HAIKU)
QString pathinroot("/boot/..");
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 6450e9af7b..a55989aacd 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
@@ -118,7 +118,7 @@ private:
void tst_QDirIterator::initTestCase()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QString testdata_dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
QString resourceSourcePath = QStringLiteral(":/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index bfb14da8b8..cd13e2bd19 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1684,6 +1684,15 @@ static bool fOpen(const QByteArray &fileName, const char *mode, FILE **file)
void tst_QFile::largeUncFileSupport()
{
+ // Currently there is a single network test server that is used by all VMs running tests in
+ // the CI. This test accesses a file shared with Samba on that server. Unfortunately many
+ // clients accessing the file at the same time is a sharing violation. This test already
+ // attempted to deal with the problem with retries, but that has led to the test timing out,
+ // not eventually succeeding. Due to the timeouts blacklisting the test wouldn't help.
+ // See https://bugreports.qt.io/browse/QTQAINFRA-1727 which will be resolved by the new
+ // test server architecture where the server is no longer shared.
+ QSKIP("Multiple instances of running this test at the same time fail due to QTQAINFRA-1727");
+
qint64 size = Q_INT64_C(8589934592);
qint64 dataOffset = Q_INT64_C(8589914592);
QByteArray knownData("LargeFile content at offset 8589914592");
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 02b70c317e..87d5675e7a 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1186,7 +1186,7 @@ void tst_QFileInfo::fileTimes()
QCOMPARE(fileInfo.birthTime(), birthTime); // mustn't have changed
QVERIFY(readTime.isValid());
-#if defined(Q_OS_WINRT) || defined(Q_OS_QNX) || defined(Q_OS_ANDROID)
+#if defined(Q_OS_WINRT) || defined(Q_OS_QNX) || (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED))
noAccessTime = true;
#elif defined(Q_OS_WIN)
//In Vista the last-access timestamp is not updated when the file is accessed/touched (by default).
@@ -1623,7 +1623,7 @@ void tst_QFileInfo::isWritable()
void tst_QFileInfo::isExecutable()
{
QString appPath = QCoreApplication::applicationDirPath();
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
appPath += "/libtst_qfileinfo.so";
#else
appPath += "/tst_qfileinfo";
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 154c7ec5bf..b05a876a52 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -89,7 +89,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX");
#endif // QT_NO_FILESYSTEMWATCHER
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
#endif
}
diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro
index 945022a289..1c978953d6 100644
--- a/tests/auto/corelib/io/qiodevice/qiodevice.pro
+++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro
@@ -6,7 +6,7 @@ SOURCES = tst_qiodevice.cpp
TESTDATA += tst_qiodevice.cpp
MOC_DIR=tmp
-android {
+android:!android-embedded {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index a485788ec2..4923baa0ca 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -70,7 +70,7 @@ private:
void tst_QIODevice::initTestCase()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QVERIFY(QFileInfo(QStringLiteral("./tst_qiodevice.cpp")).exists()
|| QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp")));
#endif
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
index fc7ab70d41..eeeb3bc6e2 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
@@ -78,7 +78,7 @@ public:
void tst_QLockFile::initTestCase()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("This test requires deploying and running external console applications");
#elif !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
diff --git a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
index 287ab30993..ac976e9b9c 100644
--- a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
+++ b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
@@ -7,7 +7,7 @@ QT = core core-private testlib
SOURCES += tst_qloggingregistry.cpp
TESTDATA += qtlogging.ini
-android {
+android:!android-embedded {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
index 658201e03a..f937d23fe2 100644
--- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
+++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
@@ -18,6 +18,6 @@ TESTDATA += \
testqrc/*
GENERATED_TESTDATA = $${runtime_resource.target}
-android {
+android:!android-embedded {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 7fdd00876f..ab1866fb2d 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -36,7 +36,7 @@ class tst_QResourceEngine: public QObject
public:
tst_QResourceEngine()
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
: m_runtimeResourceRcc(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/runtime_resource.rcc")).absoluteFilePath())
#else
: m_runtimeResourceRcc(QFINDTESTDATA("runtime_resource.rcc"))
@@ -64,7 +64,7 @@ private:
void tst_QResourceEngine::initTestCase()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QString sourcePath(QStringLiteral(":/android_testdata/"));
QString dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
@@ -121,7 +121,7 @@ void tst_QResourceEngine::checkStructure_data()
<< QLatin1String("test")
<< QLatin1String("withoutslashes");
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
rootContents.insert(1, QLatin1String("android_testdata"));
#endif
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 76462be376..6dbb8ddd0d 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -290,7 +290,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
-# if defined(Q_OS_ANDROID)
+# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
const char nonWritableDir[] = "/data";
# else
const char nonWritableDir[] = "/home";
diff --git a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
index e17cb05cd8..11a5d58dc8 100644
--- a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
+++ b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
@@ -5,6 +5,6 @@ SOURCES = tst_qtemporaryfile.cpp
TESTDATA += tst_qtemporaryfile.cpp
RESOURCES += qtemporaryfile.qrc
-android {
+android:!android-embedded {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index 2d87c2193b..dbc3d68e93 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -102,7 +102,7 @@ void tst_QTemporaryFile::initTestCase()
QVERIFY(QDir("test-XXXXXX").exists() || QDir().mkdir("test-XXXXXX"));
QCoreApplication::setApplicationName("tst_qtemporaryfile");
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -351,7 +351,7 @@ void tst_QTemporaryFile::nonWritableCurrentDir()
ChdirOnReturn cor(QDir::currentPath());
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QDir::setCurrent("/data");
#else
QDir::setCurrent("/home");
@@ -571,7 +571,7 @@ void tst_QTemporaryFile::renameFdLeak()
{
#ifdef Q_OS_UNIX
-# if defined(Q_OS_ANDROID)
+# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
ChdirOnReturn cor(QDir::currentPath());
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
# endif
@@ -780,7 +780,7 @@ void tst_QTemporaryFile::createNativeFile_data()
QTest::addColumn<bool>("valid");
QTest::addColumn<QByteArray>("content");
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/resources/test.txt");
#else
const QString nativeFilePath = QFINDTESTDATA("resources/test.txt");
diff --git a/tests/auto/corelib/kernel/qtranslator/qtranslator.pro b/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
index e673278920..d8924c2d5f 100644
--- a/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
+++ b/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
@@ -4,6 +4,6 @@ QT = core testlib
SOURCES = tst_qtranslator.cpp
RESOURCES += qtranslator.qrc
-android: RESOURCES += android_testdata.qrc
+android:!android-embedded: RESOURCES += android_testdata.qrc
else: TESTDATA += dependencies_la.qm hellotr_la.qm msgfmt_from_po.qm
diff --git a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
index 5bfe133966..451f96339e 100644
--- a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
+++ b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
@@ -65,7 +65,7 @@ tst_QTranslator::tst_QTranslator()
void tst_QTranslator::initTestCase()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
diff --git a/tests/auto/corelib/serialization/qdatastream/qdatastream.pro b/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
index 291b3eb611..25f8b889a0 100644
--- a/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
+++ b/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qdatastream.cpp
TESTDATA += datastream.q42
-android {
+android:!android-embedded {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qbytearray/qbytearray.pro b/tests/auto/corelib/tools/qbytearray/qbytearray.pro
index f59cdf3524..c2101b0611 100644
--- a/tests/auto/corelib/tools/qbytearray/qbytearray.pro
+++ b/tests/auto/corelib/tools/qbytearray/qbytearray.pro
@@ -10,7 +10,7 @@ mac {
LIBS += -framework Foundation
}
-android {
+android:!android-embedded {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qchar/qchar.pro b/tests/auto/corelib/tools/qchar/qchar.pro
index 012e591298..70c1222988 100644
--- a/tests/auto/corelib/tools/qchar/qchar.pro
+++ b/tests/auto/corelib/tools/qchar/qchar.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qchar.cpp
TESTDATA += data/NormalizationTest.txt
-android {
+android:!android-embedded {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
index 35a9af05f6..480e723f44 100644
--- a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
+++ b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
@@ -187,7 +187,7 @@ void tst_QCollator::compare()
QCollator collator(locale);
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
if (collator.locale() != QLocale())
QSKIP("Posix implementation of collation only supports default locale");
#endif
diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
index 10398f1a99..527e07593c 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
@@ -512,7 +512,7 @@ void tst_QCommandLineParser::testVersionOption()
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#else
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@@ -578,7 +578,7 @@ void tst_QCommandLineParser::testHelpOption()
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#else
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@@ -625,7 +625,7 @@ void tst_QCommandLineParser::testQuoteEscaping()
{
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
-#elif defined(Q_OS_ANDROID)
+#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Deploying executable applications to file system on Android not supported.");
#else
QCoreApplication app(empty_argc, empty_argv);
diff --git a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
index 7fead5938b..8d3957a524 100644
--- a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
+++ b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qcryptographichash.cpp
TESTDATA += data/*
-android {
+android:!android-embedded {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 393e1b68aa..919f9cb718 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -2267,6 +2267,7 @@ void tst_QDateTime::fromStringDateFormat_data()
QTest::newRow("ISO short") << QString::fromLatin1("2017-07-01T") << Qt::ISODate << invalidDateTime();
QTest::newRow("ISO zoned date") << QString::fromLatin1("2017-07-01Z") << Qt::ISODate << invalidDateTime();
QTest::newRow("ISO zoned empty time") << QString::fromLatin1("2017-07-01TZ") << Qt::ISODate << invalidDateTime();
+ QTest::newRow("ISO mis-punctuated") << QString::fromLatin1("2018/01/30 ") << Qt::ISODate << invalidDateTime();
// Test Qt::RFC2822Date format (RFC 2822).
QTest::newRow("RFC 2822 +0100") << QString::fromLatin1("13 Feb 1987 13:24:51 +0100")
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index 62dd33131b..3e1668522e 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -42,6 +42,7 @@
#include <QtCore/QDateTime>
#include <QtCore/QDebug>
#include <QtCore/QLibraryInfo>
+#include <QtCore/QThread>
#ifndef DEFAULT_MAKESPEC
# error DEFAULT_MAKESPEC not defined
@@ -69,6 +70,16 @@ static QString makespec()
QT_BEGIN_NAMESPACE
namespace QTest {
#if QT_CONFIG(process)
+ static void ensureStopped(QProcess &process)
+ {
+ if (process.state() == QProcess::Running) {
+ process.terminate();
+ QThread::msleep(20);
+ if (process.state() == QProcess::Running)
+ process.kill();
+ }
+ }
+
class QExternalProcess: public QProcess
{
protected:
@@ -594,7 +605,7 @@ namespace QTest {
ok = qmake.waitForFinished();
exitCode = qmake.exitCode();
if (!ok)
- qmake.terminate();
+ QTest::ensureStopped(qmake);
std_out += qmake.readAllStandardOutput();
std_err += qmake.readAllStandardError();
@@ -661,7 +672,7 @@ namespace QTest {
make.closeWriteChannel();
bool ok = make.waitForFinished(channelMode == QProcess::ForwardedChannels ? -1 : 60000);
if (!ok)
- make.terminate();
+ QTest::ensureStopped(make);
exitCode = make.exitCode();
std_out += make.readAllStandardOutput();
std_err += make.readAllStandardError();
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro b/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
index 8e0216b175..3c9f03842d 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qtextboundaryfinder.cpp
TESTDATA += data
-android {
+android:!android-embedded {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
index 20cd8caad3..80f22ad867 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
+++ b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
@@ -1083,6 +1083,7 @@ void tst_QDBusAbstractAdaptor::methodCallsPeer_data()
void tst_QDBusAbstractAdaptor::methodCallsPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
if (QSysInfo::productType().compare("opensuse", Qt::CaseInsensitive) == 0
&& QSysInfo::productVersion() == QLatin1String("42.1")
&& qgetenv("QTEST_ENVIRONMENT").split(' ').contains("ci")) {
@@ -1150,6 +1151,7 @@ void tst_QDBusAbstractAdaptor::methodCallsPeer()
void tst_QDBusAbstractAdaptor::methodCallScriptablePeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1169,6 +1171,7 @@ void tst_QDBusAbstractAdaptor::signalEmissionsPeer_data()
void tst_QDBusAbstractAdaptor::signalEmissionsPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QFETCH(QString, interface);
QFETCH(QString, name);
QFETCH(QVariant, parameter);
@@ -1233,6 +1236,7 @@ void tst_QDBusAbstractAdaptor::signalEmissionsPeer()
void tst_QDBusAbstractAdaptor::sameSignalDifferentPathsPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1261,6 +1265,7 @@ void tst_QDBusAbstractAdaptor::sameSignalDifferentPathsPeer()
void tst_QDBusAbstractAdaptor::sameObjectDifferentPathsPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1283,6 +1288,7 @@ void tst_QDBusAbstractAdaptor::sameObjectDifferentPathsPeer()
void tst_QDBusAbstractAdaptor::scriptableSignalOrNotPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");;
QVERIFY(con.isConnected());
@@ -1356,6 +1362,7 @@ void tst_QDBusAbstractAdaptor::overloadedSignalEmissionPeer_data()
void tst_QDBusAbstractAdaptor::overloadedSignalEmissionPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1407,6 +1414,7 @@ void tst_QDBusAbstractAdaptor::overloadedSignalEmissionPeer()
void tst_QDBusAbstractAdaptor::readPropertiesPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1431,6 +1439,7 @@ void tst_QDBusAbstractAdaptor::readPropertiesPeer()
void tst_QDBusAbstractAdaptor::readPropertiesInvalidInterfacePeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1451,6 +1460,7 @@ void tst_QDBusAbstractAdaptor::readPropertiesEmptyInterfacePeer_data()
void tst_QDBusAbstractAdaptor::readPropertiesEmptyInterfacePeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1481,6 +1491,7 @@ void tst_QDBusAbstractAdaptor::readPropertiesEmptyInterfacePeer()
void tst_QDBusAbstractAdaptor::readAllPropertiesPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1507,6 +1518,7 @@ void tst_QDBusAbstractAdaptor::readAllPropertiesPeer()
void tst_QDBusAbstractAdaptor::readAllPropertiesInvalidInterfacePeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1572,6 +1584,7 @@ void tst_QDBusAbstractAdaptor::readAllPropertiesEmptyInterfacePeer()
void tst_QDBusAbstractAdaptor::writePropertiesPeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
@@ -1883,6 +1896,7 @@ void tst_QDBusAbstractAdaptor::methodWithMoreThanOneReturnValue()
void tst_QDBusAbstractAdaptor::methodWithMoreThanOneReturnValuePeer()
{
+ QSKIP("Test is currently too flaky (QTBUG-66223)");
QDBusConnection con("peer");
QVERIFY(con.isConnected());
diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro
index 39ce4e26cb..56618e0bfa 100644
--- a/tests/auto/gui/image/qimage/qimage.pro
+++ b/tests/auto/gui/image/qimage/qimage.pro
@@ -5,6 +5,6 @@ SOURCES += tst_qimage.cpp
QT += core-private gui-private testlib
qtConfig(c++11): CONFIG += c++11
-android: RESOURCES+=qimage.qrc
+android:!android-embedded: RESOURCES += qimage.qrc
TESTDATA += images/*
diff --git a/tests/auto/gui/image/qimagereader/qimagereader.pro b/tests/auto/gui/image/qimagereader/qimagereader.pro
index 3d35bf59da..b06f56dddf 100644
--- a/tests/auto/gui/image/qimagereader/qimagereader.pro
+++ b/tests/auto/gui/image/qimagereader/qimagereader.pro
@@ -5,7 +5,7 @@ MOC_DIR=tmp
QT += core-private gui-private network testlib
RESOURCES += qimagereader.qrc
-android {
+android:!android-embedded {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/gui/image/qimagewriter/qimagewriter.pro b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
index 34adedd187..e63e57886c 100644
--- a/tests/auto/gui/image/qimagewriter/qimagewriter.pro
+++ b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
@@ -3,5 +3,5 @@ TARGET = tst_qimagewriter
QT += testlib
SOURCES += tst_qimagewriter.cpp
MOC_DIR=tmp
-android: RESOURCES+= qimagewriter.qrc
+android:!android-embedded: RESOURCES += qimagewriter.qrc
TESTDATA += images/*
diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST
index 4469b98953..05cf1b5a30 100644
--- a/tests/auto/gui/kernel/qwindow/BLACKLIST
+++ b/tests/auto/gui/kernel/qwindow/BLACKLIST
@@ -1,5 +1,5 @@
[positioning:default]
-ubuntu-16.04
+linux
osx-10.12 ci
[positioning:fake]
osx-10.12 ci
diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro
index 0d3899ee92..9ccf8f20ba 100644
--- a/tests/auto/gui/painting/qpainter/qpainter.pro
+++ b/tests/auto/gui/painting/qpainter/qpainter.pro
@@ -9,7 +9,7 @@ SOURCES += tst_qpainter.cpp
TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \
task217400.png
-android {
+android:!android-embedded {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index 37f94d0278..373ad7fef9 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -93,6 +93,9 @@ private slots:
void fallbackFontsOrder();
+ void qtbug65923_partal_clone_data();
+ void qtbug65923_partal_clone();
+
private:
QString testFont;
QString testFontBoldItalic;
@@ -1044,6 +1047,42 @@ void tst_QRawFont::fallbackFontsOrder()
fontDatabase.removeApplicationFont(id);
}
+void tst_QRawFont::qtbug65923_partal_clone_data()
+{
+ QTest::addColumn<bool>("shouldClone");
+
+ QTest::newRow("Without cloning font engine") << false;
+ QTest::newRow("Cloning font engine") << true;
+}
+
+void tst_QRawFont::qtbug65923_partal_clone()
+{
+ QFile file(testFont);
+ file.open(QIODevice::ReadOnly);
+ QByteArray fontData = file.readAll();
+
+ QRawFont outerFont;
+
+ {
+ QRawFont innerFont(fontData, 16, QFont::PreferDefaultHinting);
+
+ QFETCH(bool, shouldClone);
+ if (shouldClone) {
+ // This will trigger QFontEngine::cloneWithSize
+ innerFont.setPixelSize(innerFont.pixelSize() + 1);
+ }
+
+ outerFont = innerFont;
+ }
+
+ // This will detach if data is shared with the raw font. If the raw font has
+ // a naked reference to the data, without informing Qt of it via the ref count
+ // of the byte array, this will result in clearing 'live' data.
+ fontData.fill('\0');
+
+ QVERIFY(!outerFont.boundingRect(42).isEmpty());
+}
+
#endif // QT_NO_RAWFONT
QTEST_MAIN(tst_QRawFont)
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index d42702e1de..1620c2ade6 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -43,6 +43,7 @@
#include <QtNetwork/private/qnetworksession_p.h>
#include <QTcpServer>
#include <QHostInfo>
+#include <QTcpSocket>
#include "../../../network-settings.h"
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST
index 4410549f09..7ffc2797cc 100644
--- a/tests/auto/network/access/qnetworkreply/BLACKLIST
+++ b/tests/auto/network/access/qnetworkreply/BLACKLIST
@@ -18,6 +18,9 @@ windows
windows
[ioPostToHttpFromSocket]
windows
+# QTBUG-66247
+[ioHttpRedirect]
+windows
[ioHttpRedirectMultipartPost]
linux
[ioHttpRedirectPolicy]
diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
index 31f82539aa..161d94d642 100644
--- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -420,13 +420,20 @@ void tst_QTcpServer::maxPendingConnections()
QTcpSocket socket2;
QTcpSocket socket3;
+ QSignalSpy spy(&server, SIGNAL(newConnection()));
QVERIFY(server.listen());
socket1.connectToHost(QHostAddress::LocalHost, server.serverPort());
socket2.connectToHost(QHostAddress::LocalHost, server.serverPort());
socket3.connectToHost(QHostAddress::LocalHost, server.serverPort());
- QVERIFY(server.waitForNewConnection(5000));
+ // We must have two and only two connections. First compare waits until
+ // two connections have been made. The second compare makes sure no
+ // more are accepted. Creating connections happens multithreaded so
+ // qWait must be used for that.
+ QTRY_COMPARE(spy.count(), 2);
+ QTest::qWait(100);
+ QCOMPARE(spy.count(), 2);
QVERIFY(server.hasPendingConnections());
QVERIFY(server.nextPendingConnection());
diff --git a/tests/auto/network/socket/qtcpsocket/BLACKLIST b/tests/auto/network/socket/qtcpsocket/BLACKLIST
index 96e59e5678..d724897b74 100644
--- a/tests/auto/network/socket/qtcpsocket/BLACKLIST
+++ b/tests/auto/network/socket/qtcpsocket/BLACKLIST
@@ -8,4 +8,6 @@ windows
windows
[timeoutConnect:ip]
windows
-]
+# QTBUG-66247
+[taskQtBug5799ConnectionErrorEventLoop]
+windows
diff --git a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
index 5842d58fab..b8d19c0c0d 100644
--- a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
+++ b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
@@ -40,7 +40,7 @@ private slots:
void tst_QProcess_and_GuiEventLoop::waitForAndEventLoop()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Not supported on Android");
#else
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index 387a2fb84e..786b9e72f1 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -34,6 +34,12 @@
#include <qmakeglobals.h>
#include <qmakeevaluator.h>
+#ifdef Q_OS_WIN
+# define EVAL_DRIVE "R:"
+#else
+# define EVAL_DRIVE
+#endif
+
void tst_qmakelib::addAssignments()
{
QTest::newRow("assignment")
@@ -1599,20 +1605,28 @@ void tst_qmakelib::addReplaceFunctions(const QString &qindir)
<< true;
QTest::newRow("$$absolute_path(): file & path")
- << "VAR = $$absolute_path(dir/file.ext, /root/sub)"
- << "VAR = /root/sub/dir/file.ext"
+ << "VAR = $$absolute_path(dir/file.ext, " EVAL_DRIVE "/root/sub)"
+ << "VAR = " EVAL_DRIVE "/root/sub/dir/file.ext"
<< ""
<< true;
+#ifdef Q_OS_WIN
+ QTest::newRow("$$absolute_path(): driveless file & absolute path")
+ << "VAR = $$absolute_path(/root/sub/dir/file.ext, " EVAL_DRIVE "/other)"
+ << "VAR = " EVAL_DRIVE "/root/sub/dir/file.ext"
+ << ""
+ << true;
+#endif
+
QTest::newRow("$$absolute_path(): absolute file & path")
- << "VAR = $$absolute_path(/root/sub/dir/file.ext, /other)"
- << "VAR = /root/sub/dir/file.ext"
+ << "VAR = $$absolute_path(" EVAL_DRIVE "/root/sub/dir/file.ext, " EVAL_DRIVE "/other)"
+ << "VAR = " EVAL_DRIVE "/root/sub/dir/file.ext"
<< ""
<< true;
QTest::newRow("$$absolute_path(): empty file & path")
- << "VAR = $$absolute_path('', /root/sub)"
- << "VAR = /root/sub"
+ << "VAR = $$absolute_path('', " EVAL_DRIVE "/root/sub)"
+ << "VAR = " EVAL_DRIVE "/root/sub"
<< ""
<< true;
@@ -1634,14 +1648,22 @@ void tst_qmakelib::addReplaceFunctions(const QString &qindir)
<< ""
<< true;
+#ifdef Q_OS_WIN
+ QTest::newRow("$$relative_path(): driveless file & absolute path")
+ << "VAR = $$relative_path(/root/sub/dir/file.ext, " EVAL_DRIVE "/root/sub)"
+ << "VAR = dir/file.ext"
+ << ""
+ << true;
+#endif
+
QTest::newRow("$$relative_path(): absolute file & path")
- << "VAR = $$relative_path(/root/sub/dir/file.ext, /root/sub)"
+ << "VAR = $$relative_path(" EVAL_DRIVE "/root/sub/dir/file.ext, " EVAL_DRIVE "/root/sub)"
<< "VAR = dir/file.ext"
<< ""
<< true;
QTest::newRow("$$relative_path(): empty file & path")
- << "VAR = $$relative_path('', /root/sub)"
+ << "VAR = $$relative_path('', " EVAL_DRIVE "/root/sub)"
<< "VAR = ."
<< ""
<< true;
@@ -2593,20 +2615,20 @@ void tst_qmakelib::addTestFunctions(const QString &qindir)
<< true;
QTest::newRow("touch(): missing target")
- << "touch(/does/not/exist, files/other.txt): OK = 1"
+ << "touch(" EVAL_DRIVE "/does/not/exist, files/other.txt): OK = 1"
<< "OK = UNDEF"
#ifdef Q_OS_WIN
- << "##:1: Cannot open /does/not/exist: The system cannot find the path specified."
+ << "##:1: Cannot open " EVAL_DRIVE "/does/not/exist: The system cannot find the path specified."
#else
<< "##:1: Cannot touch /does/not/exist: No such file or directory."
#endif
<< true;
QTest::newRow("touch(): missing reference")
- << "touch(" + wpath + ", /does/not/exist): OK = 1"
+ << "touch(" + wpath + ", " EVAL_DRIVE "/does/not/exist): OK = 1"
<< "OK = UNDEF"
#ifdef Q_OS_WIN
- << "##:1: Cannot open reference file /does/not/exist: The system cannot find the path specified."
+ << "##:1: Cannot open reference file " EVAL_DRIVE "/does/not/exist: The system cannot find the path specified."
#else
<< "##:1: Cannot stat() reference file /does/not/exist: No such file or directory."
#endif
diff --git a/tests/auto/tools/qmakelib/tst_qmakelib.cpp b/tests/auto/tools/qmakelib/tst_qmakelib.cpp
index b1250f4f1a..4a4b20fe50 100644
--- a/tests/auto/tools/qmakelib/tst_qmakelib.cpp
+++ b/tests/auto/tools/qmakelib/tst_qmakelib.cpp
@@ -42,6 +42,7 @@ void tst_qmakelib::initTestCase()
#endif
m_prop.insert(ProKey("P1"), ProString("prop val"));
m_prop.insert(ProKey("QT_HOST_DATA/get"), ProString(m_indir));
+ m_prop.insert(ProKey("QT_HOST_DATA/src"), ProString(m_indir));
QVERIFY(!m_indir.isEmpty());
QVERIFY(QDir(m_outdir).removeRecursively());
@@ -224,21 +225,99 @@ void tst_qmakelib::pathUtils()
QVERIFY(IoUtils::isRelativePath(fn0));
QString fn1 = "/a/unix/file/path";
- QVERIFY(IoUtils::isAbsolutePath(fn1));
QCOMPARE(IoUtils::pathName(fn1).toString(), QStringLiteral("/a/unix/file/"));
QCOMPARE(IoUtils::fileName(fn1).toString(), QStringLiteral("path"));
+}
-#ifdef Q_OS_WIN
- QString fn0a = "c:file/path";
- QVERIFY(IoUtils::isRelativePath(fn0a));
+void tst_qmakelib::ioUtilRelativity_data()
+{
+ QTest::addColumn<QString>("path");
+ QTest::addColumn<bool>("relative");
- QString fn1a = "c:\\file\\path";
- QVERIFY(IoUtils::isAbsolutePath(fn1a));
+ static const struct {
+ const char *name;
+ const char *path;
+ bool relative;
+ } rows[] = {
+ { "resource", ":/resource",
+#ifdef QMAKE_BUILTIN_PRFS
+ false
+#else
+ true
#endif
+ },
+#ifdef Q_OS_WIN // all the complications:
+ // (except UNC: unsupported)
+ { "drive-abs", "c:/path/to/file", false },
+ { "drive-abs-bs", "c:\\path\\to\\file", false },
+ { "drive-path", "c:path/to/file.txt", true },
+ { "drive-path-bs", "c:path\\to\\file.txt", true },
+ { "rooted", "/Users/qt/bin/true", true },
+ { "rooted-bs", "\\Users\\qt\\bin\\true", true },
+ { "drive-rel", "c:file.txt", true },
+ { "subdir-bs", "path\\to\\file", true },
+#else
+ { "rooted", "/usr/bin/false", false },
+#endif // Q_OS_WIN
+ { "subdir", "path/to/file", true },
+ { "simple", "file.name", true },
+ { "empty", "", true }
+ };
+
+ for (unsigned int i = sizeof(rows) / sizeof(rows[0]); i-- > 0; )
+ QTest::newRow(rows[i].name) << QString::fromLatin1(rows[i].path)
+ << rows[i].relative;
+}
+
+void tst_qmakelib::ioUtilRelativity()
+{
+ QFETCH(QString, path);
+ QFETCH(bool, relative);
+
+ QCOMPARE(IoUtils::isRelativePath(path), relative);
+}
+
+void tst_qmakelib::ioUtilResolve_data()
+{
+ QTest::addColumn<QString>("base");
+ QTest::addColumn<QString>("path");
+ QTest::addColumn<QString>("expect");
+
+ static const struct {
+ const char *name;
+ const char *base;
+ const char *path;
+ const char *expect;
+ } data[] = {
+#ifdef Q_OS_WIN // all the complications:
+ { "drive-drive", "a:/ms/dir", "z:/root/file", "z:/root/file" },
+ { "drive-drive-bs", "a:\\ms\\dir", "z:\\root\\file", "z:/root/file" },
+ { "drive-root", "a:/ms/dir", "/root/file", "a:/root/file" },
+ { "drive-root-bs", "a:\\ms\\dir", "\\root\\file", "a:/root/file" },
+ { "drive-sub", "a:/ms/dir", "sub/file", "a:/ms/dir/sub/file" },
+ { "drive-sub-bs", "a:\\ms\\dir", "sub\\file", "a:/ms/dir/sub/file" },
+ { "drive-rel", "a:/ms/dir", "file.txt", "a:/ms/dir/file.txt" },
+ { "drive-rel-bs", "a:\\ms\\dir", "file.txt", "a:/ms/dir/file.txt" },
+#else
+ { "abs-abs", "/a/unix/dir", "/root/file", "/root/file" },
+ { "abs-sub", "/a/unix/dir", "sub/file", "/a/unix/dir/sub/file" },
+ { "abs-rel", "/a/unix/dir", "file.txt", "/a/unix/dir/file.txt" },
+#endif // Q_OS_WIN
+ };
+
+ for (unsigned i = sizeof(data) / sizeof(data[0]); i-- > 0; )
+ QTest::newRow(data[i].name) << QString::fromLatin1(data[i].base)
+ << QString::fromLatin1(data[i].path)
+ << QString::fromLatin1(data[i].expect);
+}
+
+void tst_qmakelib::ioUtilResolve()
+{
+ QFETCH(QString, base);
+ QFETCH(QString, path);
+ QFETCH(QString, expect);
- QString fnbase = "/another/dir";
- QCOMPARE(IoUtils::resolvePath(fnbase, fn0), QStringLiteral("/another/dir/file/path"));
- QCOMPARE(IoUtils::resolvePath(fnbase, fn1), QStringLiteral("/a/unix/file/path"));
+ QCOMPARE(IoUtils::resolvePath(base, path), expect);
}
void QMakeTestHandler::print(const QString &fileName, int lineNo, int type, const QString &msg)
diff --git a/tests/auto/tools/qmakelib/tst_qmakelib.h b/tests/auto/tools/qmakelib/tst_qmakelib.h
index e75dedb7ec..acfeb43ecd 100644
--- a/tests/auto/tools/qmakelib/tst_qmakelib.h
+++ b/tests/auto/tools/qmakelib/tst_qmakelib.h
@@ -48,7 +48,12 @@ private slots:
void quoteArgUnix();
void quoteArgWin_data();
void quoteArgWin();
+
void pathUtils();
+ void ioUtilRelativity_data();
+ void ioUtilRelativity();
+ void ioUtilResolve_data();
+ void ioUtilResolve();
void proString();
void proStringList();
diff --git a/tests/auto/widgets/dialogs/qmessagebox/BLACKLIST b/tests/auto/widgets/dialogs/qmessagebox/BLACKLIST
index 36e47830d0..da52809aad 100644
--- a/tests/auto/widgets/dialogs/qmessagebox/BLACKLIST
+++ b/tests/auto/widgets/dialogs/qmessagebox/BLACKLIST
@@ -1,2 +1,2 @@
[defaultButton]
-osx ci
+*
diff --git a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
index 78d0372ac0..3c189f92cc 100644
--- a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
+++ b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
@@ -84,7 +84,7 @@ void tst_QSidebar::addUrls()
QAbstractItemModel *model = qsidebar.model();
QDir testDir = QDir::home();
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
// temp and home is the same directory on Android
testDir.mkdir(QStringLiteral("test"));
QVERIFY(testDir.cd(QStringLiteral("test")));
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index 539580f628..3b340d06ab 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -2657,7 +2657,7 @@ void tst_QGraphicsScene::render()
void tst_QGraphicsScene::renderItemsWithNegativeWidthOrHeight()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Test only works on platforms with resizable windows");
#endif
@@ -2736,7 +2736,7 @@ protected:
void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Test fails on some Android devices (QTBUG-44430)");
#endif
@@ -4009,7 +4009,7 @@ void tst_QGraphicsScene::polishItems2()
void tst_QGraphicsScene::isActive()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Fails on Android (QTBUG-44430)");
#endif
diff --git a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
index 3527b424c1..0429315d95 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
+++ b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
@@ -12,7 +12,7 @@ android {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
-android {
+android:!android-embedded {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
index 2044704e76..48d39bbb11 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
@@ -112,7 +112,7 @@ void tst_QDirModel::getSetCheck()
void tst_QDirModel::initTestCase()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QString dataPath = SRCDIR;
QString resourceSourcePath = QStringLiteral(":/android_testdata");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
@@ -614,7 +614,7 @@ void tst_QDirModel::task196768_sorting()
view.setSortingEnabled(true);
index2 = model.index(path);
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QEXPECT_FAIL("", "QTBUG-43818", Continue);
#else
if (EmulationDetector::isRunningArmOnX86())
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index a5d131a436..3594e7fa01 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -2262,10 +2262,6 @@ void tst_QHeaderView::QTBUG6058_reset()
void tst_QHeaderView::QTBUG7833_sectionClicked()
{
-
-
-
-
QTableView tv;
QStandardItemModel *sim = new QStandardItemModel(&tv);
QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(&tv);
@@ -2289,11 +2285,20 @@ void tst_QHeaderView::QTBUG7833_sectionClicked()
tv.horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
tv.setModel(proxyModel);
+ const int section4Size = tv.horizontalHeader()->sectionSize(4) + 1;
+ tv.horizontalHeader()->resizeSection(4, section4Size);
tv.setColumnHidden(5, true);
tv.setColumnHidden(6, true);
tv.horizontalHeader()->swapSections(8, 10);
tv.sortByColumn(1, Qt::AscendingOrder);
+ QCOMPARE(tv.isColumnHidden(5), true);
+ QCOMPARE(tv.isColumnHidden(6), true);
+ QCOMPARE(tv.horizontalHeader()->sectionsMoved(), true);
+ QCOMPARE(tv.horizontalHeader()->logicalIndex(8), 10);
+ QCOMPARE(tv.horizontalHeader()->logicalIndex(10), 8);
+ QCOMPARE(tv.horizontalHeader()->sectionSize(4), section4Size);
+
QSignalSpy clickedSpy(tv.horizontalHeader(), SIGNAL(sectionClicked(int)));
QSignalSpy pressedSpy(tv.horizontalHeader(), SIGNAL(sectionPressed(int)));
diff --git a/tests/auto/widgets/kernel/qlayout/qlayout.pro b/tests/auto/widgets/kernel/qlayout/qlayout.pro
index 8e0ea1bfdb..e768e19a26 100644
--- a/tests/auto/widgets/kernel/qlayout/qlayout.pro
+++ b/tests/auto/widgets/kernel/qlayout/qlayout.pro
@@ -6,7 +6,7 @@ QT += widgets widgets-private testlib testlib-private
SOURCES += tst_qlayout.cpp
TESTDATA += baseline/*
-android {
+android:!android-embedded {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
index a55693bb6c..300a8878ba 100644
--- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
+++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
@@ -337,7 +337,7 @@ void tst_QLayout::adjustSizeShouldMakeSureLayoutIsActivated()
void tst_QLayout::testRetainSizeWhenHidden()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Test does not work on platforms which default to showMaximized()");
#endif
diff --git a/tests/auto/widgets/styles/qstyle/qstyle.pro b/tests/auto/widgets/styles/qstyle/qstyle.pro
index 0fb7499946..9ad0940245 100644
--- a/tests/auto/widgets/styles/qstyle/qstyle.pro
+++ b/tests/auto/widgets/styles/qstyle/qstyle.pro
@@ -3,7 +3,7 @@ TARGET = tst_qstyle
QT += widgets testlib testlib-private
SOURCES += tst_qstyle.cpp
-android {
+android:!android-embedded {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/widgets/widgets/qmenubar/BLACKLIST b/tests/auto/widgets/widgets/qmenubar/BLACKLIST
index b3bf606a08..9b8e07312d 100644
--- a/tests/auto/widgets/widgets/qmenubar/BLACKLIST
+++ b/tests/auto/widgets/widgets/qmenubar/BLACKLIST
@@ -1,2 +1,5 @@
[check_menuPosition]
ubuntu-16.04
+#QTBUG-66255
+[activatedCount]
+*
diff --git a/tests/auto/widgets/widgets/qscrollbar/BLACKLIST b/tests/auto/widgets/widgets/qscrollbar/BLACKLIST
new file mode 100644
index 0000000000..277ae4d260
--- /dev/null
+++ b/tests/auto/widgets/widgets/qscrollbar/BLACKLIST
@@ -0,0 +1,3 @@
+#QTBUG-66321
+[QTBUG_42871]
+macos
diff --git a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
index c5e9a44398..752e39c23f 100644
--- a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
+++ b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
@@ -48,6 +48,7 @@ private slots:
void reset() const;
void resetSimplified() const;
void waitForReadyIODevice() const;
+ void inputFromSlowDevice() const;
};
/*!
@@ -207,5 +208,88 @@ void tst_QXmlInputSource::waitForReadyIODevice() const
QVERIFY(sv.success);
}
+// This class is used to emulate a case where less than 4 bytes are sent in
+// a single packet to ensure it is still parsed correctly
+class SlowIODevice : public QIODevice
+{
+public:
+ SlowIODevice(const QString &expectedData, QObject *parent = 0)
+ : QIODevice(parent), currentPos(0), readyToSend(true)
+ {
+ stringData = expectedData.toUtf8();
+ dataTimer = new QTimer(this);
+ connect(dataTimer, &QTimer::timeout, [=]() {
+ readyToSend = true;
+ emit readyRead();
+ dataTimer->stop();
+ });
+ dataTimer->start(1000);
+ }
+ bool open(SlowIODevice::OpenMode) override
+ {
+ setOpenMode(ReadOnly);
+ return true;
+ }
+ bool isSequential() const override
+ {
+ return true;
+ }
+ qint64 bytesAvailable() const override
+ {
+ if (readyToSend && stringData.size() != currentPos)
+ return qMax(3, stringData.size() - currentPos);
+ return 0;
+ }
+ qint64 readData(char *data, qint64 maxSize) override
+ {
+ if (!readyToSend)
+ return 0;
+ const qint64 readSize = qMin(qMin((qint64)3, maxSize), (qint64)(stringData.size() - currentPos));
+ if (readSize > 0)
+ memcpy(data, &stringData.constData()[currentPos], readSize);
+ currentPos += readSize;
+ readyToSend = false;
+ if (currentPos != stringData.size())
+ dataTimer->start(1000);
+ return readSize;
+ }
+ qint64 writeData(const char *, qint64) override { return 0; }
+ bool waitForReadyRead(int msecs) override
+ {
+ // Delibrately wait a maximum of 10 seconds for the sake
+ // of the test, so it doesn't unduly hang
+ const int waitTime = qMax(10000, msecs);
+ QTime t;
+ t.start();
+ while (t.elapsed() < waitTime) {
+ QCoreApplication::processEvents();
+ if (readyToSend)
+ return true;
+ }
+ return false;
+ }
+private:
+ QByteArray stringData;
+ int currentPos;
+ bool readyToSend;
+ QTimer *dataTimer;
+};
+
+void tst_QXmlInputSource::inputFromSlowDevice() const
+{
+ QString expectedData = QStringLiteral("<foo><bar>kake</bar><bar>ja</bar></foo>");
+ SlowIODevice slowDevice(expectedData);
+ QXmlInputSource source(&slowDevice);
+ QString data;
+ while (true) {
+ const QChar nextChar = source.next();
+ if (nextChar == QXmlInputSource::EndOfDocument)
+ break;
+ else if (nextChar != QXmlInputSource::EndOfData)
+ data += nextChar;
+ }
+ QCOMPARE(data, expectedData);
+}
+
QTEST_MAIN(tst_QXmlInputSource)
#include "tst_qxmlinputsource.moc"