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>
This commit is contained in:
parent
450962be95
commit
7c64ab4966
2
configure
vendored
2
configure
vendored
@ -7543,6 +7543,8 @@ CFG_CONCURRENT="yes"
|
|||||||
if [ "$canBuildQtConcurrent" = "no" ]; then
|
if [ "$canBuildQtConcurrent" = "no" ]; then
|
||||||
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
|
||||||
CFG_CONCURRENT="no"
|
CFG_CONCURRENT="no"
|
||||||
|
else
|
||||||
|
QT_CONFIG="$QT_CONFIG concurrent"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
|
if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
|
||||||
|
@ -45,12 +45,9 @@
|
|||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include <qfuture.h>
|
#include <qfuture.h>
|
||||||
#include "versioncheck.h"
|
|
||||||
#include <qfuturewatcher.h>
|
#include <qfuturewatcher.h>
|
||||||
#include <qtconcurrentresultstore.h>
|
#include <qtconcurrentresultstore.h>
|
||||||
#include <qtconcurrentexception.h>
|
#include <qtconcurrentexception.h>
|
||||||
|
|
||||||
#ifndef QT_NO_CONCURRENT_TEST
|
|
||||||
#include <private/qfutureinterface_p.h>
|
#include <private/qfutureinterface_p.h>
|
||||||
|
|
||||||
using namespace QtConcurrent;
|
using namespace QtConcurrent;
|
||||||
@ -90,8 +87,6 @@ private slots:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
QTEST_MAIN(tst_QFuture)
|
|
||||||
|
|
||||||
void tst_QFuture::resultStore()
|
void tst_QFuture::resultStore()
|
||||||
{
|
{
|
||||||
int int0 = 0;
|
int int0 = 0;
|
||||||
@ -1467,8 +1462,5 @@ void tst_QFuture::exceptions_QTBUG18149()
|
|||||||
|
|
||||||
#endif // QT_NO_EXCEPTIONS
|
#endif // QT_NO_EXCEPTIONS
|
||||||
|
|
||||||
|
QTEST_MAIN(tst_QFuture)
|
||||||
#include "tst_qfuture.moc"
|
#include "tst_qfuture.moc"
|
||||||
|
|
||||||
#else
|
|
||||||
QTEST_NOOP_MAIN
|
|
||||||
#endif
|
|
||||||
|
@ -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
|
|
@ -43,13 +43,10 @@
|
|||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
#include <qfuture.h>
|
#include <qfuture.h>
|
||||||
#include "../qfuture/versioncheck.h"
|
|
||||||
#include <qfuturewatcher.h>
|
#include <qfuturewatcher.h>
|
||||||
#include <qtconcurrentrun.h>
|
#include <qtconcurrentrun.h>
|
||||||
#include <qtconcurrentmap.h>
|
#include <qtconcurrentmap.h>
|
||||||
#include "../../../../shared/util.h"
|
#include "../../../../shared/util.h"
|
||||||
|
|
||||||
#ifndef QT_NO_CONCURRENT_TEST
|
|
||||||
#include <private/qfutureinterface_p.h>
|
#include <private/qfutureinterface_p.h>
|
||||||
|
|
||||||
using namespace QtConcurrent;
|
using namespace QtConcurrent;
|
||||||
@ -85,8 +82,6 @@ private slots:
|
|||||||
void warnRace();
|
void warnRace();
|
||||||
};
|
};
|
||||||
|
|
||||||
QTEST_MAIN(tst_QFutureWatcher)
|
|
||||||
|
|
||||||
void sleeper()
|
void sleeper()
|
||||||
{
|
{
|
||||||
QTest::qSleep(100);
|
QTest::qSleep(100);
|
||||||
@ -923,8 +918,5 @@ void tst_QFutureWatcher::warnRace()
|
|||||||
future.waitForFinished();
|
future.waitForFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(tst_QFutureWatcher)
|
||||||
#include "tst_qfuturewatcher.moc"
|
#include "tst_qfuturewatcher.moc"
|
||||||
|
|
||||||
#else
|
|
||||||
QTEST_NOOP_MAIN
|
|
||||||
#endif
|
|
||||||
|
@ -45,7 +45,8 @@
|
|||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
#include "../qtconcurrentmap/functions.h"
|
#include "../qtconcurrentmap/functions.h"
|
||||||
#include "../qfuture/versioncheck.h"
|
|
||||||
|
#if !defined(QT_NO_CONCURRENT_FILTER)
|
||||||
|
|
||||||
class tst_QtConcurrentFilter : public QObject
|
class tst_QtConcurrentFilter : public QObject
|
||||||
{
|
{
|
||||||
@ -63,8 +64,6 @@ private slots:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined (QT_NO_CONCURRENT_TEST) && !defined(QT_NO_CONCURRENT_FILTER)
|
|
||||||
|
|
||||||
void tst_QtConcurrentFilter::filter()
|
void tst_QtConcurrentFilter::filter()
|
||||||
{
|
{
|
||||||
// functor
|
// functor
|
||||||
@ -1536,15 +1535,8 @@ QTEST_MAIN(tst_QtConcurrentFilter)
|
|||||||
|
|
||||||
#else
|
#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
|
QTEST_NOOP_MAIN
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "tst_qtconcurrentfilter.moc"
|
#include "tst_qtconcurrentfilter.moc"
|
||||||
|
@ -2,4 +2,3 @@ load(qttest_p4)
|
|||||||
SOURCES += tst_qtconcurrentiteratekernel.cpp
|
SOURCES += tst_qtconcurrentiteratekernel.cpp
|
||||||
QT = core
|
QT = core
|
||||||
CONFIG += parallel_test
|
CONFIG += parallel_test
|
||||||
CONFIG += parallel_test
|
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include "../qfuture/versioncheck.h"
|
|
||||||
|
|
||||||
struct TestIterator
|
struct TestIterator
|
||||||
{
|
{
|
||||||
@ -82,12 +81,9 @@ int distance(TestIterator &a, TestIterator &b)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <qtconcurrentiteratekernel.h>
|
#include <qtconcurrentiteratekernel.h>
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
#ifndef QT_NO_CONCURRENT_TEST
|
|
||||||
|
|
||||||
using namespace QtConcurrent;
|
using namespace QtConcurrent;
|
||||||
|
|
||||||
class tst_QtConcurrentIterateKernel: public QObject
|
class tst_QtConcurrentIterateKernel: public QObject
|
||||||
@ -355,7 +351,3 @@ void tst_QtConcurrentIterateKernel::stresstestWhile()
|
|||||||
QTEST_MAIN(tst_QtConcurrentIterateKernel)
|
QTEST_MAIN(tst_QtConcurrentIterateKernel)
|
||||||
|
|
||||||
#include "tst_qtconcurrentiteratekernel.moc"
|
#include "tst_qtconcurrentiteratekernel.moc"
|
||||||
|
|
||||||
#else
|
|
||||||
QTEST_NOOP_MAIN
|
|
||||||
#endif
|
|
||||||
|
@ -3,4 +3,3 @@ DEFINES += QT_STRICT_ITERATORS
|
|||||||
SOURCES += tst_qtconcurrentmap.cpp
|
SOURCES += tst_qtconcurrentmap.cpp
|
||||||
QT = core
|
QT = core
|
||||||
CONFIG += parallel_test
|
CONFIG += parallel_test
|
||||||
CONFIG += parallel_test
|
|
||||||
|
@ -47,7 +47,8 @@
|
|||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "../qfuture/versioncheck.h"
|
|
||||||
|
#if !defined(QT_NO_CONCURRENT_MAP)
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QVector<int>);
|
Q_DECLARE_METATYPE(QVector<int>);
|
||||||
Q_DECLARE_METATYPE(QVector<double>);
|
Q_DECLARE_METATYPE(QVector<double>);
|
||||||
@ -82,8 +83,6 @@ public slots:
|
|||||||
void throttling();
|
void throttling();
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined (QT_NO_CONCURRENT_TEST) && !defined(QT_NO_CONCURRENT_MAP)
|
|
||||||
|
|
||||||
using namespace QtConcurrent;
|
using namespace QtConcurrent;
|
||||||
|
|
||||||
void multiplyBy2Immutable(int x)
|
void multiplyBy2Immutable(int x)
|
||||||
@ -2420,23 +2419,6 @@ QTEST_MAIN(tst_QtConcurrentMap)
|
|||||||
|
|
||||||
#else
|
#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
|
QTEST_NOOP_MAIN
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -2,4 +2,3 @@ load(qttest_p4)
|
|||||||
SOURCES += tst_qtconcurrentrun.cpp
|
SOURCES += tst_qtconcurrentrun.cpp
|
||||||
QT = core
|
QT = core
|
||||||
CONFIG += parallel_test
|
CONFIG += parallel_test
|
||||||
CONFIG += parallel_test
|
|
||||||
|
@ -43,9 +43,6 @@
|
|||||||
#include <qfuture.h>
|
#include <qfuture.h>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include "../qfuture/versioncheck.h"
|
|
||||||
|
|
||||||
#ifndef QT_NO_CONCURRENT_TEST
|
|
||||||
|
|
||||||
using namespace QtConcurrent;
|
using namespace QtConcurrent;
|
||||||
|
|
||||||
@ -81,9 +78,6 @@ private slots:
|
|||||||
# define F(X) X
|
# define F(X) X
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
QTEST_MAIN(tst_QtConcurrentRun)
|
|
||||||
|
|
||||||
void light()
|
void light()
|
||||||
{
|
{
|
||||||
qDebug("in function");
|
qDebug("in function");
|
||||||
@ -507,8 +501,5 @@ void tst_QtConcurrentRun::lambda()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QTEST_MAIN(tst_QtConcurrentRun)
|
||||||
#include "tst_qtconcurrentrun.moc"
|
#include "tst_qtconcurrentrun.moc"
|
||||||
|
|
||||||
#else
|
|
||||||
QTEST_NOOP_MAIN
|
|
||||||
#endif
|
|
||||||
|
@ -2,4 +2,3 @@ load(qttest_p4)
|
|||||||
SOURCES += tst_qtconcurrentthreadengine.cpp
|
SOURCES += tst_qtconcurrentthreadengine.cpp
|
||||||
QT = core
|
QT = core
|
||||||
CONFIG += parallel_test
|
CONFIG += parallel_test
|
||||||
CONFIG += parallel_test
|
|
||||||
|
@ -42,9 +42,6 @@
|
|||||||
#include <qtconcurrentexception.h>
|
#include <qtconcurrentexception.h>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include "../qfuture/versioncheck.h"
|
|
||||||
|
|
||||||
#ifndef QT_NO_CONCURRENT_TEST
|
|
||||||
|
|
||||||
using namespace QtConcurrent;
|
using namespace QtConcurrent;
|
||||||
|
|
||||||
@ -530,7 +527,3 @@ void tst_QtConcurrentThreadEngine::exceptions()
|
|||||||
QTEST_MAIN(tst_QtConcurrentThreadEngine)
|
QTEST_MAIN(tst_QtConcurrentThreadEngine)
|
||||||
|
|
||||||
#include "tst_qtconcurrentthreadengine.moc"
|
#include "tst_qtconcurrentthreadengine.moc"
|
||||||
|
|
||||||
#else
|
|
||||||
QTEST_NOOP_MAIN
|
|
||||||
#endif
|
|
||||||
|
@ -11,3 +11,5 @@ SUBDIRS=\
|
|||||||
thread \
|
thread \
|
||||||
tools \
|
tools \
|
||||||
xml
|
xml
|
||||||
|
|
||||||
|
!contains(QT_CONFIG, concurrent): SUBDIRS -= concurrent
|
||||||
|
Loading…
Reference in New Issue
Block a user