summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-11 14:15:52 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-12 18:01:19 +0200
commit7c64ab4966e24834768eb1a09b3d2fd08471787a (patch)
tree7b3c8a0b800f250eec1c9adc952eb6be7a206201 /tests
parent450962be95cbde7c1b23aaa455bf7238e7b2513f (diff)
Exclude qtconcurrent tests via .pro files.
If Qt is built without QtConcurrent, the relevant autotests should be excluded from the build, rather than building empty tests that appear to pass and thus produce confusing test results. Change-Id: I43bafcb0ffa42e8981bec4e27bf6a23a28d86df9 Reviewed-on: http://codereview.qt-project.org/6395 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp10
-rw-r--r--tests/auto/corelib/concurrent/qfuture/versioncheck.h49
-rw-r--r--tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp10
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp14
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro1
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp8
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentmap/qtconcurrentmap.pro1
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp22
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentrun/qtconcurrentrun.pro1
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp11
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro1
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp7
-rw-r--r--tests/auto/corelib/corelib.pro2
13 files changed, 10 insertions, 127 deletions
diff --git a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
index d81df0d863..495884c806 100644
--- a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
@@ -45,12 +45,9 @@
#include <QtTest/QtTest>
#include <qfuture.h>
-#include "versioncheck.h"
#include <qfuturewatcher.h>
#include <qtconcurrentresultstore.h>
#include <qtconcurrentexception.h>
-
-#ifndef QT_NO_CONCURRENT_TEST
#include <private/qfutureinterface_p.h>
using namespace QtConcurrent;
@@ -90,8 +87,6 @@ private slots:
#endif
};
-QTEST_MAIN(tst_QFuture)
-
void tst_QFuture::resultStore()
{
int int0 = 0;
@@ -1467,8 +1462,5 @@ void tst_QFuture::exceptions_QTBUG18149()
#endif // QT_NO_EXCEPTIONS
+QTEST_MAIN(tst_QFuture)
#include "tst_qfuture.moc"
-
-#else
-QTEST_NOOP_MAIN
-#endif
diff --git a/tests/auto/corelib/concurrent/qfuture/versioncheck.h b/tests/auto/corelib/concurrent/qfuture/versioncheck.h
deleted file mode 100644
index 9e4d0c6eeb..0000000000
--- a/tests/auto/corelib/concurrent/qfuture/versioncheck.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qglobal.h>
-
-#ifdef QT_NO_CONCURRENT
-#define QT_NO_CONCURRENT_TEST
-#endif
-
-#if defined(Q_CC_MSVC) && _MSC_VER < 1400
-#define QT_NO_CONCURRENT_TEST
-#endif
diff --git a/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
index d8fa2230f3..615a4c507f 100644
--- a/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
+++ b/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
@@ -43,13 +43,10 @@
#include <QtTest/QtTest>
#include <qfuture.h>
-#include "../qfuture/versioncheck.h"
#include <qfuturewatcher.h>
#include <qtconcurrentrun.h>
#include <qtconcurrentmap.h>
#include "../../../../shared/util.h"
-
-#ifndef QT_NO_CONCURRENT_TEST
#include <private/qfutureinterface_p.h>
using namespace QtConcurrent;
@@ -85,8 +82,6 @@ private slots:
void warnRace();
};
-QTEST_MAIN(tst_QFutureWatcher)
-
void sleeper()
{
QTest::qSleep(100);
@@ -923,8 +918,5 @@ void tst_QFutureWatcher::warnRace()
future.waitForFinished();
}
+QTEST_MAIN(tst_QFutureWatcher)
#include "tst_qfuturewatcher.moc"
-
-#else
-QTEST_NOOP_MAIN
-#endif
diff --git a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index b292b3857d..0aa3be938f 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -45,7 +45,8 @@
#include <QtTest/QtTest>
#include "../qtconcurrentmap/functions.h"
-#include "../qfuture/versioncheck.h"
+
+#if !defined(QT_NO_CONCURRENT_FILTER)
class tst_QtConcurrentFilter : public QObject
{
@@ -63,8 +64,6 @@ private slots:
#endif
};
-#if !defined (QT_NO_CONCURRENT_TEST) && !defined(QT_NO_CONCURRENT_FILTER)
-
void tst_QtConcurrentFilter::filter()
{
// functor
@@ -1536,15 +1535,8 @@ QTEST_MAIN(tst_QtConcurrentFilter)
#else
-void tst_QtConcurrentFilter::filter() {}
-void tst_QtConcurrentFilter::filtered() {}
-void tst_QtConcurrentFilter::filteredReduced() {}
-void tst_QtConcurrentFilter::resultAt() {}
-void tst_QtConcurrentFilter::incrementalResults() {}
-void tst_QtConcurrentFilter::stlContainers() {}
-void tst_QtConcurrentFilter::noDetatch() {}
-
QTEST_NOOP_MAIN
+
#endif
#include "tst_qtconcurrentfilter.moc"
diff --git a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro b/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
index a61d275241..c8cfe4c115 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
+++ b/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
@@ -2,4 +2,3 @@ load(qttest_p4)
SOURCES += tst_qtconcurrentiteratekernel.cpp
QT = core
CONFIG += parallel_test
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
index 2cf6fe9a2d..65c3f53a52 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
#include <QThread>
-#include "../qfuture/versioncheck.h"
struct TestIterator
{
@@ -82,12 +81,9 @@ int distance(TestIterator &a, TestIterator &b)
}
#endif
-
#include <qtconcurrentiteratekernel.h>
#include <QtTest/QtTest>
-#ifndef QT_NO_CONCURRENT_TEST
-
using namespace QtConcurrent;
class tst_QtConcurrentIterateKernel: public QObject
@@ -355,7 +351,3 @@ void tst_QtConcurrentIterateKernel::stresstestWhile()
QTEST_MAIN(tst_QtConcurrentIterateKernel)
#include "tst_qtconcurrentiteratekernel.moc"
-
-#else
-QTEST_NOOP_MAIN
-#endif
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/qtconcurrentmap.pro b/tests/auto/corelib/concurrent/qtconcurrentmap/qtconcurrentmap.pro
index 6fc358514e..4edfc64cb3 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/qtconcurrentmap.pro
+++ b/tests/auto/corelib/concurrent/qtconcurrentmap/qtconcurrentmap.pro
@@ -3,4 +3,3 @@ DEFINES += QT_STRICT_ITERATORS
SOURCES += tst_qtconcurrentmap.cpp
QT = core
CONFIG += parallel_test
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index 4a8a18ba6d..330e6b908e 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -47,7 +47,8 @@
#include <QtTest/QtTest>
#include "functions.h"
-#include "../qfuture/versioncheck.h"
+
+#if !defined(QT_NO_CONCURRENT_MAP)
Q_DECLARE_METATYPE(QVector<int>);
Q_DECLARE_METATYPE(QVector<double>);
@@ -82,8 +83,6 @@ public slots:
void throttling();
};
-#if !defined (QT_NO_CONCURRENT_TEST) && !defined(QT_NO_CONCURRENT_MAP)
-
using namespace QtConcurrent;
void multiplyBy2Immutable(int x)
@@ -2420,23 +2419,6 @@ QTEST_MAIN(tst_QtConcurrentMap)
#else
-void tst_QtConcurrentMap::map() {}
-void tst_QtConcurrentMap::blocking_map() {}
-void tst_QtConcurrentMap::mapped() {}
-void tst_QtConcurrentMap::blocking_mapped() {}
-void tst_QtConcurrentMap::mappedReduced() {}
-void tst_QtConcurrentMap::blocking_mappedReduced() {}
-void tst_QtConcurrentMap::assignResult() {}
-void tst_QtConcurrentMap::functionOverloads() {}
-#ifndef QT_NO_EXCEPTIONS
-void tst_QtConcurrentMap::exceptions() {}
-#endif
-void tst_QtConcurrentMap::incrementalResults() {}
-void tst_QtConcurrentMap::stressTest() {}
-void tst_QtConcurrentMap::throttling() {}
-void tst_QtConcurrentMap::stlContainers() {}
-void tst_QtConcurrentMap::noDetatch() {}
-
QTEST_NOOP_MAIN
#endif
diff --git a/tests/auto/corelib/concurrent/qtconcurrentrun/qtconcurrentrun.pro b/tests/auto/corelib/concurrent/qtconcurrentrun/qtconcurrentrun.pro
index 24576048e9..dfccf06de9 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentrun/qtconcurrentrun.pro
+++ b/tests/auto/corelib/concurrent/qtconcurrentrun/qtconcurrentrun.pro
@@ -2,4 +2,3 @@ load(qttest_p4)
SOURCES += tst_qtconcurrentrun.cpp
QT = core
CONFIG += parallel_test
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
index b29e0fabd5..14a7edb735 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -43,9 +43,6 @@
#include <qfuture.h>
#include <QString>
#include <QtTest/QtTest>
-#include "../qfuture/versioncheck.h"
-
-#ifndef QT_NO_CONCURRENT_TEST
using namespace QtConcurrent;
@@ -81,9 +78,6 @@ private slots:
# define F(X) X
#endif
-
-QTEST_MAIN(tst_QtConcurrentRun)
-
void light()
{
qDebug("in function");
@@ -507,8 +501,5 @@ void tst_QtConcurrentRun::lambda()
}
#endif
+QTEST_MAIN(tst_QtConcurrentRun)
#include "tst_qtconcurrentrun.moc"
-
-#else
-QTEST_NOOP_MAIN
-#endif
diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
index bbfcf5ebe3..d7e2464089 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
+++ b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
@@ -2,4 +2,3 @@ load(qttest_p4)
SOURCES += tst_qtconcurrentthreadengine.cpp
QT = core
CONFIG += parallel_test
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
index f22a2ed64b..4beefef98d 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
@@ -42,9 +42,6 @@
#include <qtconcurrentexception.h>
#include <QThread>
#include <QtTest/QtTest>
-#include "../qfuture/versioncheck.h"
-
-#ifndef QT_NO_CONCURRENT_TEST
using namespace QtConcurrent;
@@ -530,7 +527,3 @@ void tst_QtConcurrentThreadEngine::exceptions()
QTEST_MAIN(tst_QtConcurrentThreadEngine)
#include "tst_qtconcurrentthreadengine.moc"
-
-#else
-QTEST_NOOP_MAIN
-#endif
diff --git a/tests/auto/corelib/corelib.pro b/tests/auto/corelib/corelib.pro
index b9063e5306..50228990c9 100644
--- a/tests/auto/corelib/corelib.pro
+++ b/tests/auto/corelib/corelib.pro
@@ -11,3 +11,5 @@ SUBDIRS=\
thread \
tools \
xml
+
+!contains(QT_CONFIG, concurrent): SUBDIRS -= concurrent