summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-06 18:56:31 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-07 04:30:30 +0200
commit924d810dbdcd5b5b0fa860922b2487ea9062d002 (patch)
treeb14117ac5b9a2d8d02a502adbd00b94ba5eef424 /tests/benchmarks
parent13251dcaea443d2f228fc797e54318191048e588 (diff)
Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I95feba3edbfa092c0ef4d85bb8c6877bd6be698e Reviewed-on: http://codereview.qt-project.org/6128 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp8
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp8
2 files changed, 10 insertions, 6 deletions
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 4ff6b15fae..02757888ee 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -144,8 +144,10 @@ private slots:
void mapRectToScene();
void mapRectFromScene_data();
void mapRectFromScene();
+#ifndef Q_WS_WINCE_WM
void chipTester_data();
void chipTester();
+#endif
void deepNesting_data();
void deepNesting();
void imageRiver_data();
@@ -395,6 +397,8 @@ void tst_QGraphicsView::mapRectFromScene()
}
}
+// This test does not make sense Windows Mobile without OpenGL
+#ifndef Q_WS_WINCE_WM
void tst_QGraphicsView::chipTester_data()
{
QTest::addColumn<bool>("antialias");
@@ -416,9 +420,6 @@ void tst_QGraphicsView::chipTester_data()
void tst_QGraphicsView::chipTester()
{
-#ifdef Q_WS_WINCE_WM
-QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL", SkipAll);
-#endif
QFETCH(bool, antialias);
QFETCH(bool, opengl);
QFETCH(int, operation);
@@ -436,6 +437,7 @@ QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL", SkipAll);
tester.runBenchmark();
}
}
+#endif
static void addChildHelper(QGraphicsItem *parent, int n, bool rotate)
{
diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
index abf4f14894..842e2750b0 100644
--- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -74,7 +74,9 @@ public slots:
void cleanup();
private slots:
void ipv4LoopbackPerformanceTest();
+#ifndef Q_WS_WINCE_WM
void ipv6LoopbackPerformanceTest();
+#endif
void ipv4PerformanceTest();
};
@@ -165,14 +167,13 @@ void tst_QTcpServer::ipv4LoopbackPerformanceTest()
}
//----------------------------------------------------------------------------------
+// IPv6 loopback not yet supported on Windows Mobile
+#ifndef Q_WS_WINCE_WM
void tst_QTcpServer::ipv6LoopbackPerformanceTest()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy)
return;
-#if defined(Q_WS_WINCE_WM)
- QSKIP("WinCE WM: Not yet supported", SkipAll);
-#endif
QTcpServer server;
if (!server.listen(QHostAddress::LocalHostIPv6, 0)) {
@@ -217,6 +218,7 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest()
delete clientB;
}
}
+#endif
//----------------------------------------------------------------------------------
void tst_QTcpServer::ipv4PerformanceTest()