summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2013-05-31 11:32:42 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2013-06-07 14:46:24 +0300
commite2968576e7c50be1bf8454f9bcd2f09036a713d8 (patch)
tree1235e3fe5a8b076cceab8e9a8f87473a98c318bc
parentb89b9ef13a88ceda5b8ebc1b5e3e7e4530a4e2ba (diff)
discoverertest: skip async test on platforms that do not have a glib event loop
-rw-r--r--tests/auto/discoverertest.cpp5
-rw-r--r--tests/auto/qgsttest.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/discoverertest.cpp b/tests/auto/discoverertest.cpp
index 59212d8..76fd62c 100644
--- a/tests/auto/discoverertest.cpp
+++ b/tests/auto/discoverertest.cpp
@@ -578,6 +578,11 @@ void DiscovererTest::testAsyncDiscovery_data()
void DiscovererTest::testAsyncDiscovery()
{
+// glib event loop required - see QCoreApplicationPrivate::createEventDispatcher() for the defines check
+#if defined(Q_OS_WIN) || defined(Q_OS_BLACKBERRY) || defined(QT_NO_GLIB)
+ QSKIP_PORT("Platform does not have a GLib event loop", SkipAll);
+#endif
+
// setup discovery timeout
m_eventLoop.reset(new QEventLoop);
QTimer::singleShot(3000, m_eventLoop.data(), SLOT(quit()));
diff --git a/tests/auto/qgsttest.h b/tests/auto/qgsttest.h
index 2464fbb..f60e5f1 100644
--- a/tests/auto/qgsttest.h
+++ b/tests/auto/qgsttest.h
@@ -23,6 +23,14 @@
#include <QGst/Init>
#include <gst/gst.h>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+# define SkipSingle 0
+# define SkipAll 0
+# define QSKIP_PORT(m, a) QSKIP(m)
+#else
+# define QSKIP_PORT(m, a) QSKIP(m, a)
+#endif
+
class QGstTest : public QObject
{
Q_OBJECT