summaryrefslogtreecommitdiffstats
path: root/tests/auto/dbus
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-12-14 10:42:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-14 11:02:47 +0100
commitaa434bc90861f1599209edd6bc614802c50704dc (patch)
tree7420ac80740cebee8a8f4161a6366e31c9cbc247 /tests/auto/dbus
parentd64c4662f01ffc94c68e7c9f7abdb6309e67e489 (diff)
tst_QDBusXmlParser: make XML attribute order deterministic
Avoid QHash randomization so that the order of the XML attributes is stable This was causing intermittent failures. Change-Id: I4cc0dba4b0c2ec36601f3b06fb17ff80005cc9fb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests/auto/dbus')
-rw-r--r--tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
index 35cf989753..6d58fdf6d0 100644
--- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
+++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
@@ -58,6 +58,7 @@ private:
QString clean_xml(const QString&);
private slots:
+ void initTestCase();
void parsing_data();
void parsing();
void parsingWithDoctype_data();
@@ -71,6 +72,12 @@ private slots:
void properties();
};
+void tst_QDBusXmlParser::initTestCase()
+{
+ // Avoid QHash randomization so that the order of the XML attributes is stable
+ qputenv("QT_HASH_SEED", "123");
+}
+
void tst_QDBusXmlParser::parsing_data()
{
QTest::addColumn<QString>("xmlData");