From 6a6cdccee43288e2abb6a6e16e4e911062911374 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 7 Jun 2017 08:23:10 +0200 Subject: tst_QSharedMemory::readOnly: Skip on macOS The binary hangs rather than segfaults on that platform. Task-number: QTBUG-59936 Change-Id: Id7d38edb7c746e3c0cd4b4941e0e19b3d42a628a Reviewed-by: Jake Petroules --- tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp index 8833321b4f..3b25000b22 100644 --- a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp +++ b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp @@ -459,6 +459,8 @@ void tst_QSharedMemory::readOnly() { #if !QT_CONFIG(process) QSKIP("No qprocess support", SkipAll); +#elif defined(Q_OS_MACOS) + QSKIP("QTBUG-59936: Times out on macOS", SkipAll); #else rememberKey("readonly_segfault"); // ### on windows disable the popup somehow -- cgit v1.2.3 From 8e776d39ff9fbdf74422ab431a94c0aea6b98cfd Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 23 May 2017 09:46:36 +0200 Subject: Fix tst_qresourceengine for platforms with embedded test data load(resources) makes embedding the test data into the executable fail for platforms that use builtin test data. As the load call is only used to obtain QMAKE_RCC we can avoid that call by assuming that rcc was not renamed and assembling the path ourself. Change-Id: I25b982d10f5617d9a213803e7e4bcc85fc66b2e7 Reviewed-by: Maurice Kalinowski --- tests/auto/corelib/io/qresourceengine/qresourceengine.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro index a39de3c4d5..7676b04a03 100644 --- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro +++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro @@ -1,13 +1,13 @@ CONFIG += testcase TARGET = tst_qresourceengine -load(resources) + QT = core testlib SOURCES = tst_qresourceengine.cpp RESOURCES += testqrc/test.qrc runtime_resource.target = runtime_resource.rcc runtime_resource.depends = $$PWD/testqrc/test.qrc -runtime_resource.commands = $$QMAKE_RCC -root /runtime_resource/ -binary $${runtime_resource.depends} -o $${runtime_resource.target} +runtime_resource.commands = $$[QT_INSTALL_BINS]/rcc -root /runtime_resource/ -binary $${runtime_resource.depends} -o $${runtime_resource.target} QMAKE_EXTRA_TARGETS = runtime_resource PRE_TARGETDEPS += $${runtime_resource.target} QMAKE_DISTCLEAN += $${runtime_resource.target} -- cgit v1.2.3 From 5441f399af7880f3957751d1601354aaec802666 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 11 May 2017 11:50:11 +0200 Subject: Fix tst_QDir::emptyDir It is possible that tmpdir already exists as a leftover from previous tests. That is no reason for the test to fail. Change-Id: I010633fb92defb064093af9872ae6fd2178f07dd Reviewed-by: Friedemann Kleint Reviewed-by: Maurice Kalinowski --- tests/auto/corelib/io/qdir/tst_qdir.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index 946620d61f..da948849f6 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -2322,8 +2322,11 @@ void tst_QDir::cdBelowRoot() void tst_QDir::emptyDir() { const QString tempDir = QDir::currentPath() + "/tmpdir/"; - QVERIFY(QDir().mkdir(tempDir)); - QVERIFY(QDir(tempDir).mkdir("emptyDirectory")); + QDir temp(tempDir); + if (!temp.exists()) { + QVERIFY(QDir().mkdir(tempDir)); + } + QVERIFY(temp.mkdir("emptyDirectory")); QDir testDir(tempDir + "emptyDirectory"); QVERIFY(testDir.isEmpty()); -- cgit v1.2.3 From 147aa291620d9e2533bbea536a748a8f8a7ed14b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 5 May 2017 16:57:56 +0100 Subject: Fix sending UTC-offset QTimeZones through QDataStream QTimeZone("UTC") should be valid, as "UTC" appears in the list of availableTimeZoneIds(), and tst_QTimeZone::dataStreamTest() constructs timezones like this, which are considered valid. The internal representation of a QTimeZone("UTC") as created by QTimeZone::QTimeZone(const QByteArray &ianaId) is a QUtcTimeZonePrivate which isValid(), so the containing QTimeZone isValid() too. When QTimeZone is serialized into a QDataStream, it calls tz.d->serialize(ds) which is QUtcTimeZonePrivate::serialize. This writes QStringLiteral("OffsetFromUtc") followed by the IANA ID and the offset (etc.) to the datastream. When QTimeZone is deserialized it looks for this marker string, and if present, it passed all of the parameters to the QTimeZone constructor (not just the name). However, that constructor does not support standard IANA timezones (only custom ones), and when it detects that the supplied IANA ID is actually listed in availableTimeZoneIds(), it leaves the pointer to the QTimeZonePrivate uninitialized (NULL), which leaves the QTimeZone invalid (isValid() returns false). Thus, a valid timezone which was serialized and then deserialized has become invalid. This also affects serialization of QDateTimes with timezones. Fixed by calling the name-only constructor first, which works (only) for IANA standard timezones and leaves the QTimeZone invalid (isValid() returns false) otherwise. In which case, we can call the many-argument contructor to create a custom timezone with the same offset as the one which was originally serialized. [ChangeLog][QtCore][QTimeZone] Fixed sending IANA standard UTC-offset QTimeZones through QDataStream, which previously came out invalid after deserialization. Task-number: QTBUG-60595 Change-Id: Id9c47e8bda701faae4d800e012afb6db545b2fe9 Reviewed-by: Oswald Buddenhagen Reviewed-by: Edward Welbourne --- tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp index c1f2822b74..e75ed5cc67 100644 --- a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp +++ b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp @@ -299,7 +299,7 @@ void tst_QTimeZone::nullTest() void tst_QTimeZone::dataStreamTest() { - // Test the OffsetFromUtc backend serialization + // Test the OffsetFromUtc backend serialization. First with a custom timezone: QTimeZone tz1("QST", 123456, "Qt Standard Time", "QST", QLocale::Norway, "Qt Testing"); QByteArray tmp; { @@ -321,6 +321,20 @@ void tst_QTimeZone::dataStreamTest() QString("Qt Standard Time")); QCOMPARE(tz2.offsetFromUtc(QDateTime::currentDateTime()), 123456); + // And then with a standard IANA timezone (QTBUG-60595): + tz1 = QTimeZone("UTC"); + QCOMPARE(tz1.isValid(), true); + { + QDataStream ds(&tmp, QIODevice::WriteOnly); + ds << tz1; + } + { + QDataStream ds(&tmp, QIODevice::ReadOnly); + ds >> tz2; + } + QCOMPARE(tz2.isValid(), true); + QCOMPARE(tz2.id(), tz1.id()); + // Test the system backend serialization tz1 = QTimeZone("Pacific/Auckland"); -- cgit v1.2.3 From 26fd805f500acfdcf730f2488a66e18c72d0ff9a Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 30 May 2017 21:45:23 +0200 Subject: macOS/iOS: Correctly ignore punctuation in QCollator When punctuation is ignored then the kUCCollatePunctionSignificantMask should not be set. This was originally thought to not be working due to a bug on the Apple platforms, but this is not the case. [ChangeLog][Platform Specific Changes][macOS][iOS] QCollator now respects the ignorePunctuation property on Apple based platforms correctly. Task-number: QTBUG-41978 Change-Id: I62044076387d6e4479f4aaef3c2f48f49dbd160e Reviewed-by: Lars Knoll --- .../auto/corelib/tools/qcollator/tst_qcollator.cpp | 84 ++++++++++++++-------- 1 file changed, 55 insertions(+), 29 deletions(-) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp index d09910fd5c..35a9af05f6 100644 --- a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp +++ b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp @@ -30,6 +30,7 @@ #include #include +#include #include @@ -88,6 +89,8 @@ void tst_QCollator::compare_data() QTest::addColumn("result"); QTest::addColumn("caseInsensitiveResult"); QTest::addColumn("numericMode"); + QTest::addColumn("ignorePunctuation"); + QTest::addColumn("punctuationResult"); /* A few tests below are commented out on the mac. It's unclear why they fail, @@ -102,55 +105,72 @@ void tst_QCollator::compare_data() comparison of Latin-1 values, although I'm not sure. So I just test digits to make sure that it's not totally broken. */ - QTest::newRow("english1") << QString("en_US") << QString("5") << QString("4") << 1 << 1 << false; - QTest::newRow("english2") << QString("en_US") << QString("4") << QString("6") << -1 << -1 << false; - QTest::newRow("english3") << QString("en_US") << QString("5") << QString("6") << -1 << -1 << false; - QTest::newRow("english4") << QString("en_US") << QString("a") << QString("b") << -1 << -1 << false; - QTest::newRow("english5") << QString("en_US") << QString("test 9") << QString("test 19") << -1 << -1 << true; + QTest::newRow("english1") << QString("en_US") << QString("5") << QString("4") << 1 << 1 << false << false << 1; + QTest::newRow("english2") << QString("en_US") << QString("4") << QString("6") << -1 << -1 << false << false << -1; + QTest::newRow("english3") << QString("en_US") << QString("5") << QString("6") << -1 << -1 << false << false << -1; + QTest::newRow("english4") << QString("en_US") << QString("a") << QString("b") << -1 << -1 << false << false << -1; + QTest::newRow("english5") << QString("en_US") << QString("test 9") << QString("test 19") << -1 << -1 << true << false << -1; + QTest::newRow("english6") << QString("en_US") << QString("test 9") << QString("test_19") << -1 << -1 << true << true << -1; + QTest::newRow("english7") << QString("en_US") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1; + QTest::newRow("english8") << QString("en_US") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0; /* In Swedish, a with ring above (E5) comes before a with diaresis (E4), which comes before o diaresis (F6), which all come after z. */ - QTest::newRow("swedish1") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << -1 << -1 << false; - QTest::newRow("swedish2") << QString("sv_SE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1 << -1 << false; - QTest::newRow("swedish3") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1 << -1 << false; - QTest::newRow("swedish4") << QString("sv_SE") << QString::fromLatin1("z") << QString::fromLatin1("\xe5") << -1 << -1 << false; - QTest::newRow("swedish5") << QString("sv_SE") << QString("9") << QString("19") << -1 << -1 << true; + QTest::newRow("swedish1") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << -1 << -1 << false << false << -1; + QTest::newRow("swedish2") << QString("sv_SE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1 << -1 << false << false << -1; + QTest::newRow("swedish3") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1 << -1 << false << false << -1; + QTest::newRow("swedish4") << QString("sv_SE") << QString::fromLatin1("z") << QString::fromLatin1("\xe5") << -1 << -1 << false << false << -1; + QTest::newRow("swedish5") << QString("sv_SE") << QString("9") << QString("19") << -1 << -1 << true << false << -1; + QTest::newRow("swedish6") << QString("sv_SE") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1; + QTest::newRow("swedish7") << QString("sv_SE") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1; + QTest::newRow("swedish8") << QString("sv_SE") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0; + /* In Norwegian, ae (E6) comes before o with stroke (D8), which comes before a with ring above (E5). */ - QTest::newRow("norwegian1") << QString("no_NO") << QString::fromLatin1("\xe6") << QString::fromLatin1("\xd8") << -1 << -1 << false; - QTest::newRow("norwegian2") << QString("no_NO") << QString::fromLatin1("\xd8") << QString::fromLatin1("\xe5") << -1 << -1 << false; - QTest::newRow("norwegian3") << QString("no_NO") << QString::fromLatin1("\xe6") << QString::fromLatin1("\xe5") << -1 << -1 << false; - QTest::newRow("norwegian4") << QString("no_NO") << QString("9") << QString("19") << -1 << -1 << true; + QTest::newRow("norwegian1") << QString("no_NO") << QString::fromLatin1("\xe6") << QString::fromLatin1("\xd8") << -1 << -1 << false << false << -1; + QTest::newRow("norwegian2") << QString("no_NO") << QString::fromLatin1("\xd8") << QString::fromLatin1("\xe5") << -1 << -1 << false << false << -1; + QTest::newRow("norwegian3") << QString("no_NO") << QString::fromLatin1("\xe6") << QString::fromLatin1("\xe5") << -1 << -1 << false << false << -1; + QTest::newRow("norwegian4") << QString("no_NO") << QString("9") << QString("19") << -1 << -1 << true << false << -1; + QTest::newRow("norwegian5") << QString("no_NO") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1; + QTest::newRow("norwegian6") << QString("no_NO") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1; + QTest::newRow("norwegian7") << QString("no_NO") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1; + QTest::newRow("norwegian8") << QString("no_NO") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0; /* In German, z comes *after* a with diaresis (E4), which comes before o diaresis (F6). */ - QTest::newRow("german1") << QString("de_DE") << QString::fromLatin1("a") << QString::fromLatin1("\xe4") << -1 << -1 << false; - QTest::newRow("german2") << QString("de_DE") << QString::fromLatin1("b") << QString::fromLatin1("\xe4") << 1 << 1 << false; - QTest::newRow("german3") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1 << 1 << false; - QTest::newRow("german4") << QString("de_DE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1 << -1 << false; - QTest::newRow("german5") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xf6") << 1 << 1 << false; - QTest::newRow("german6") << QString("de_DE") << QString::fromLatin1("\xc0") << QString::fromLatin1("\xe0") << 1 << 0 << false; - QTest::newRow("german7") << QString("de_DE") << QString::fromLatin1("\xd6") << QString::fromLatin1("\xf6") << 1 << 0 << false; - QTest::newRow("german8") << QString("de_DE") << QString::fromLatin1("oe") << QString::fromLatin1("\xf6") << 1 << 1 << false; - QTest::newRow("german9") << QString("de_DE") << QString("A") << QString("a") << 1 << 0 << false; - QTest::newRow("german10") << QString("de_DE") << QString("9") << QString("19") << -1 << -1 << true; + QTest::newRow("german1") << QString("de_DE") << QString::fromLatin1("a") << QString::fromLatin1("\xe4") << -1 << -1 << false << false << -1; + QTest::newRow("german2") << QString("de_DE") << QString::fromLatin1("b") << QString::fromLatin1("\xe4") << 1 << 1 << false << false << 1; + QTest::newRow("german3") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1 << 1 << false << false << 1; + QTest::newRow("german4") << QString("de_DE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1 << -1 << false << false << -1; + QTest::newRow("german5") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xf6") << 1 << 1 << false << false << 1; + QTest::newRow("german6") << QString("de_DE") << QString::fromLatin1("\xc0") << QString::fromLatin1("\xe0") << 1 << 0 << false << false << 0; + QTest::newRow("german7") << QString("de_DE") << QString::fromLatin1("\xd6") << QString::fromLatin1("\xf6") << 1 << 0 << false << false << 0; + QTest::newRow("german8") << QString("de_DE") << QString::fromLatin1("oe") << QString::fromLatin1("\xf6") << 1 << 1 << false << false << 1; + QTest::newRow("german9") << QString("de_DE") << QString("A") << QString("a") << 1 << 0 << false << false << 0; + QTest::newRow("german10") << QString("de_DE") << QString("9") << QString("19") << -1 << -1 << true << false << -1; + QTest::newRow("german11") << QString("de_DE") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1; + QTest::newRow("german12") << QString("de_DE") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1; + QTest::newRow("german13") << QString("de_DE") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0; /* French sorting of e and e with accent */ - QTest::newRow("french1") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("e") << 1 << 1 << false; - QTest::newRow("french2") << QString("fr_FR") << QString::fromLatin1("\xe9t") << QString::fromLatin1("et") << 1 << 1 << false; - QTest::newRow("french3") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("d") << 1 << 1 << false; - QTest::newRow("french4") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("f") << -1 << -1 << false; - QTest::newRow("french5") << QString("fr_FR") << QString("9") << QString("19") << -1 << -1 << true; + QTest::newRow("french1") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("e") << 1 << 1 << false << false << 1; + QTest::newRow("french2") << QString("fr_FR") << QString::fromLatin1("\xe9t") << QString::fromLatin1("et") << 1 << 1 << false << false << 1; + QTest::newRow("french3") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("d") << 1 << 1 << false << false << 1; + QTest::newRow("french4") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("f") << -1 << -1 << false << false << -1; + QTest::newRow("french5") << QString("fr_FR") << QString("9") << QString("19") << -1 << -1 << true << false << -1; + QTest::newRow("french6") << QString("fr_FR") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1; + QTest::newRow("french7") << QString("fr_FR") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1; + QTest::newRow("french8") << QString("fr_FR") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0; } @@ -162,6 +182,8 @@ void tst_QCollator::compare() QFETCH(int, result); QFETCH(int, caseInsensitiveResult); QFETCH(bool, numericMode); + QFETCH(bool, ignorePunctuation); + QFETCH(int, punctuationResult); QCollator collator(locale); @@ -176,6 +198,10 @@ void tst_QCollator::compare() QCOMPARE(collator.compare(s1, s2), result); collator.setCaseSensitivity(Qt::CaseInsensitive); QCOMPARE(collator.compare(s1, s2), caseInsensitiveResult); +#if !QT_CONFIG(iconv) + collator.setIgnorePunctuation(ignorePunctuation); + QCOMPARE(collator.compare(s1, s2), punctuationResult); +#endif } -- cgit v1.2.3 From 65a317e6745ee267bef7295f4dfe31d5ec62f7aa Mon Sep 17 00:00:00 2001 From: Thomas Sondergaard Date: Sun, 11 Jun 2017 18:41:57 +0200 Subject: Use QMap in QProcessEnvironment so variables are sorted The motivation for this change is to make it simple to pass a correctly sorted environment block to Win32 CreateProcess(). It is also nice in other contexts that the environment variables are sorted. The change is made for all platforms. This keeps it simple and the only ill effect is slightly slower lookups. Concerning the environment block passed to Win32 CreateProcess: The environment block that is passed to CreateProcess() must be sorted case-insensitively and without regard to locale. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx The need for sorting the environment block is also mentioned in the CreateProcess() documentation, but with less details: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx Task-number: QTBUG-61315 Change-Id: Ie1edd443301de79cf5f699d45beab01b7c0f9de3 Reviewed-by: Thiago Macieira --- tests/auto/corelib/io/qprocess/tst_qprocess.cpp | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp index 0783a65d8b..f4d6d5cb40 100644 --- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp +++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp @@ -94,6 +94,7 @@ private slots: void setEnvironment(); void setProcessEnvironment_data(); void setProcessEnvironment(); + void environmentIsSorted(); void spaceInName(); void setStandardInputFile(); void setStandardOutputFile_data(); @@ -1733,6 +1734,47 @@ void tst_QProcess::setProcessEnvironment() } } +void tst_QProcess::environmentIsSorted() +{ + QProcessEnvironment env; + env.insert(QLatin1String("a"), QLatin1String("foo_a")); + env.insert(QLatin1String("B"), QLatin1String("foo_B")); + env.insert(QLatin1String("c"), QLatin1String("foo_c")); + env.insert(QLatin1String("D"), QLatin1String("foo_D")); + env.insert(QLatin1String("e"), QLatin1String("foo_e")); + env.insert(QLatin1String("F"), QLatin1String("foo_F")); + env.insert(QLatin1String("Path"), QLatin1String("foo_Path")); + env.insert(QLatin1String("SystemRoot"), QLatin1String("foo_SystemRoot")); + + const QStringList envlist = env.toStringList(); + +#ifdef Q_OS_WIN32 + // The environment block passed to CreateProcess "[Requires that] All strings in the + // environment block must be sorted alphabetically by name. The sort is case-insensitive, + // Unicode order, without regard to locale." + // https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx + // So on Windows we sort that way. + const QStringList expected = { QLatin1String("a=foo_a"), + QLatin1String("B=foo_B"), + QLatin1String("c=foo_c"), + QLatin1String("D=foo_D"), + QLatin1String("e=foo_e"), + QLatin1String("F=foo_F"), + QLatin1String("Path=foo_Path"), + QLatin1String("SystemRoot=foo_SystemRoot") }; +#else + const QStringList expected = { QLatin1String("B=foo_B"), + QLatin1String("D=foo_D"), + QLatin1String("F=foo_F"), + QLatin1String("Path=foo_Path"), + QLatin1String("SystemRoot=foo_SystemRoot"), + QLatin1String("a=foo_a"), + QLatin1String("c=foo_c"), + QLatin1String("e=foo_e") }; +#endif + QCOMPARE(envlist, expected); +} + void tst_QProcess::systemEnvironment() { QVERIFY(!QProcess::systemEnvironment().isEmpty()); -- cgit v1.2.3 From 8875e283720e4c9ac46d63392db9c9b44edf1d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Thu, 25 May 2017 22:41:01 +0300 Subject: Blacklist flaky tst_QTimeLine tests on macOS 10.12 Task-number: QTBUG-61037 Change-Id: I604bbc815c16a5ab436d2ff4936d96d3a2d27dab Reviewed-by: J-P Nurmi --- tests/auto/corelib/tools/qtimeline/BLACKLIST | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/tools/qtimeline/BLACKLIST b/tests/auto/corelib/tools/qtimeline/BLACKLIST index b5861756d8..74f84a4a6d 100644 --- a/tests/auto/corelib/tools/qtimeline/BLACKLIST +++ b/tests/auto/corelib/tools/qtimeline/BLACKLIST @@ -1,4 +1,7 @@ [interpolation] windows +osx-10.12 [duration] windows +[frameRate] +osx-10.12 -- cgit v1.2.3 From 603963e07d063e3c31c759007a556740e6bb89a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Fri, 26 May 2017 10:09:11 +0300 Subject: Extend blacklisting of tst_QElapsedTimer::elapsed to cover macOS 10.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-58713 Change-Id: I0c467c1abcdd1284910e0a61f98646e943eae377 Reviewed-by: Tony Sarajärvi Reviewed-by: J-P Nurmi --- tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST b/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST index f6a49f032c..4cd3c2f0c8 100644 --- a/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST +++ b/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST @@ -1,2 +1,3 @@ [elapsed] windows +osx-10.12 -- cgit v1.2.3