aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp10
-rw-r--r--tests/auto/quick/qquickfocusscope/BLACKLIST2
-rw-r--r--tests/auto/quick/qquicklistview/BLACKLIST2
-rw-r--r--tests/auto/quicktest/testfiltering/tst_testfiltering.cpp60
4 files changed, 68 insertions, 6 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index 7fc43671c2..1783ded9d6 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -69,6 +69,9 @@ public:
int numLoadedEventTypes() const override;
void addEventType(const QQmlProfilerEventType &type) override;
void addEvent(const QQmlProfilerEvent &event) override;
+
+private:
+ qint64 lastTimestamp = -1;
};
void QQmlProfilerTestClient::startTrace(qint64 timestamp, const QList<int> &engineIds)
@@ -102,6 +105,9 @@ void QQmlProfilerTestClient::addEvent(const QQmlProfilerEvent &event)
const QQmlProfilerEventType &type = types[typeIndex];
+ QVERIFY(event.timestamp() >= lastTimestamp);
+ lastTimestamp = event.timestamp();
+
switch (type.message()) {
case Event: {
switch (type.detailType()) {
@@ -373,7 +379,7 @@ bool tst_QQmlProfilerService::verify(tst_QQmlProfilerService::MessageListType ty
return false;
}
- uint position = expectedPosition;
+ int position = expectedPosition;
qint64 timestamp = target->at(expectedPosition).timestamp();
while (position > 0 && target->at(position - 1).timestamp() == timestamp)
--position;
@@ -448,7 +454,7 @@ bool tst_QQmlProfilerService::verify(tst_QQmlProfilerService::MessageListType ty
}
return true;
- } while (target->at(++position).timestamp() == timestamp);
+ } while (++position < target->length() && target->at(position).timestamp() == timestamp);
foreach (const QString &message, warnings)
qWarning() << message.toLocal8Bit().constData();
diff --git a/tests/auto/quick/qquickfocusscope/BLACKLIST b/tests/auto/quick/qquickfocusscope/BLACKLIST
deleted file mode 100644
index cc3c8b6e8a..0000000000
--- a/tests/auto/quick/qquickfocusscope/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[canvasFocus]
-osx-10.11
diff --git a/tests/auto/quick/qquicklistview/BLACKLIST b/tests/auto/quick/qquicklistview/BLACKLIST
index 8cf8a57eee..15aea4be19 100644
--- a/tests/auto/quick/qquicklistview/BLACKLIST
+++ b/tests/auto/quick/qquicklistview/BLACKLIST
@@ -6,5 +6,3 @@ osx
[populateTransitions]
opensuse-42.1
#QTBUG-65964
-[QTBUG_34576_velocityZero]
-osx-10.11 ci
diff --git a/tests/auto/quicktest/testfiltering/tst_testfiltering.cpp b/tests/auto/quicktest/testfiltering/tst_testfiltering.cpp
index 8817adb3bc..1db3d5be57 100644
--- a/tests/auto/quicktest/testfiltering/tst_testfiltering.cpp
+++ b/tests/auto/quicktest/testfiltering/tst_testfiltering.cpp
@@ -38,6 +38,10 @@ private slots:
void twoFilters();
void twoFiltersWithOneMatch();
void manyFilters();
+ void filterTestWithDefaultDataTags();
+ void filterTestWithDataTags();
+ void filterTestByDataTag();
+ void filterInvalidDataTag();
};
@@ -131,6 +135,62 @@ void tst_TestFiltering::manyFilters()
QCOMPARE(process.exitCode(), 0);
}
+void tst_TestFiltering::filterTestWithDefaultDataTags()
+{
+ QProcess process;
+ process.start(testExe, { QLatin1String("Third::test_default_tags"), });
+
+ QVERIFY(process.waitForFinished());
+
+ const QString output = process.readAll();
+ QVERIFY(output.contains(QLatin1String("Totals: 5 passed")));
+ QVERIFY(output.contains(QLatin1String(" 2 skipped")));
+ QCOMPARE(process.exitStatus(), QProcess::NormalExit);
+ QCOMPARE(process.exitCode(), 0);
+}
+
+void tst_TestFiltering::filterTestWithDataTags()
+{
+ QProcess process;
+ process.start(testExe, { QLatin1String("Third::test_tags"), });
+
+ QVERIFY(process.waitForFinished());
+
+ const QString output = process.readAll();
+ QVERIFY(output.contains(QLatin1String("Totals: 4 passed")));
+ QVERIFY(output.contains(QLatin1String(" 1 skipped")));
+ QCOMPARE(process.exitStatus(), QProcess::NormalExit);
+ QCOMPARE(process.exitCode(), 0);
+}
+
+void tst_TestFiltering::filterTestByDataTag()
+{
+ QProcess process;
+ process.start(testExe, { QLatin1String("Third::test_default_tags:init_2"),
+ QLatin1String("Third::test_default_tags:skip_3"),
+ QLatin1String("Third::test_tags:baz"),
+ QLatin1String("Third::test_tags:bar"), });
+
+ QVERIFY(process.waitForFinished());
+
+ const QString output = process.readAll();
+ QVERIFY(output.contains(QLatin1String("Totals: 4 passed")));
+ QVERIFY(output.contains(QLatin1String(" 2 skipped")));
+ QCOMPARE(process.exitStatus(), QProcess::NormalExit);
+ QCOMPARE(process.exitCode(), 0);
+}
+
+void tst_TestFiltering::filterInvalidDataTag()
+{
+ QProcess process;
+ process.start(testExe, { QLatin1String("Third::test_tags:invalid_tag") });
+
+ QVERIFY(process.waitForFinished());
+
+ QCOMPARE(process.exitStatus(), QProcess::NormalExit);
+ QCOMPARE(process.exitCode(), 1);
+}
+
QTEST_MAIN(tst_TestFiltering);
#include "tst_testfiltering.moc"