Don't build empty tests.

These tests need the xmlpatterns module.  If that module is not in the
Qt build, then avoid building the test rather than building an empty
test.

Change-Id: Id0f72cfc9f818096361ecbc439196d2d5c64322e
Reviewed-on: http://codereview.qt-project.org/6487
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-10-12 15:44:20 +10:00 committed by Qt by Nokia
parent 2696c43633
commit 5f7c220011
6 changed files with 7 additions and 20 deletions

View File

@ -60,6 +60,9 @@ PRIVATETESTS += \
qpacketprotocol \
v4
# This test requires the xmlpatterns module
!contains(QT_CONFIG,xmlpatterns):PRIVATETESTS -= qdeclarativexmllistmodel
SGTESTS = \
qsganimatedimage \
qsgborderimage \

View File

@ -1,9 +1,5 @@
CONFIG += testcase
TARGET = tst_qdeclarativexmllistmodel
contains(QT_CONFIG,xmlpatterns) {
QT += xmlpatterns
DEFINES += QTEST_XMLPATTERNS
}
macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativexmllistmodel.cpp
@ -12,4 +8,4 @@ DEFINES += SRCDIR=\\\"$$PWD\\\"
CONFIG += parallel_test
QT += core-private gui-private v8-private declarative-private network testlib
QT += core-private gui-private v8-private declarative-private network testlib xmlpatterns

View File

@ -53,7 +53,6 @@
#include <QtCore/qfile.h>
#include <QtCore/qtemporaryfile.h>
#ifdef QTEST_XMLPATTERNS
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <private/qdeclarativexmllistmodel_p.h>
@ -960,7 +959,3 @@ void tst_qdeclarativexmllistmodel::roleCrash()
QTEST_MAIN(tst_qdeclarativexmllistmodel)
#include "tst_qdeclarativexmllistmodel.moc"
#else
QTEST_NOOP_MAIN
#endif

View File

@ -1,9 +1,5 @@
CONFIG += testcase
TARGET = tst_qdeclarativexmllistmodel
contains(QT_CONFIG,xmlpatterns) {
QT += xmlpatterns
DEFINES += QTEST_XMLPATTERNS
}
macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativexmllistmodel.cpp
@ -12,4 +8,4 @@ DEFINES += SRCDIR=\\\"$$PWD\\\"
CONFIG += parallel_test
QT += core-private gui-private widgets-private v8-private declarative-private qtquick1-private network testlib
QT += core-private gui-private widgets-private v8-private declarative-private qtquick1-private network testlib xmlpatterns

View File

@ -53,7 +53,6 @@
#include <QtCore/qfile.h>
#include <QtCore/qtemporaryfile.h>
#ifdef QTEST_XMLPATTERNS
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtQuick1/private/qdeclarativexmllistmodel_p.h>
@ -954,7 +953,3 @@ void tst_qdeclarativexmllistmodel::roleCrash()
QTEST_MAIN(tst_qdeclarativexmllistmodel)
#include "tst_qdeclarativexmllistmodel.moc"
#else
QTEST_NOOP_MAIN
#endif

View File

@ -45,4 +45,6 @@ contains(QT_CONFIG, private_tests) {
qdeclarativexmllistmodel \
examples
# This test needs the xmlpatterns module
!contains(QT_CONFIG,xmlpatterns): SUBDIRS -= qdeclarativexmllistmodel
}