From: Jason McDonald Date: Wed, 12 Oct 2011 05:44:20 +0000 (+1000) Subject: Don't build empty tests. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=5f7c22001163eb4bce25be1cfee4e84c5a25ff09;p=konrad%2Fqtdeclarative.git 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 --- diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index a6bbd67..6e14648 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -60,6 +60,9 @@ PRIVATETESTS += \ qpacketprotocol \ v4 +# This test requires the xmlpatterns module +!contains(QT_CONFIG,xmlpatterns):PRIVATETESTS -= qdeclarativexmllistmodel + SGTESTS = \ qsganimatedimage \ qsgborderimage \ diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro index ab850dd..4366c31 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro +++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro @@ -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 diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp index 252aea7..04eb7c6 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp +++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp @@ -53,7 +53,6 @@ #include #include -#ifdef QTEST_XMLPATTERNS #include #include #include @@ -960,7 +959,3 @@ void tst_qdeclarativexmllistmodel::roleCrash() QTEST_MAIN(tst_qdeclarativexmllistmodel) #include "tst_qdeclarativexmllistmodel.moc" - -#else -QTEST_NOOP_MAIN -#endif diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/qtquick1/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro index ea9f75b..fc74409 100644 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro +++ b/tests/auto/qtquick1/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro @@ -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 diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/qtquick1/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp index 6a919a1..021d389 100644 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp +++ b/tests/auto/qtquick1/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp @@ -53,7 +53,6 @@ #include #include -#ifdef QTEST_XMLPATTERNS #include #include #include @@ -954,7 +953,3 @@ void tst_qdeclarativexmllistmodel::roleCrash() QTEST_MAIN(tst_qdeclarativexmllistmodel) #include "tst_qdeclarativexmllistmodel.moc" - -#else -QTEST_NOOP_MAIN -#endif diff --git a/tests/auto/qtquick1/qtquick1.pro b/tests/auto/qtquick1/qtquick1.pro index bc97410..f1177cd 100644 --- a/tests/auto/qtquick1/qtquick1.pro +++ b/tests/auto/qtquick1/qtquick1.pro @@ -45,4 +45,6 @@ contains(QT_CONFIG, private_tests) { qdeclarativexmllistmodel \ examples + # This test needs the xmlpatterns module + !contains(QT_CONFIG,xmlpatterns): SUBDIRS -= qdeclarativexmllistmodel }