From 329385a5d53f7c20d25b8b492acdd45a5c5ff194 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 9 Jan 2017 11:23:10 +0100 Subject: Build examples and tests only if their requirements are met If the respective modules aren't available we cannot build the tests and examples. We drop the qtConfig(opengl) requirement for the opengl examples as a, we would need to make the QtGui configuration available for that to work, and b, we should not add too much detail to the tests and examples build configurations. Checking each test and example for every feature it uses would be too much. Task-number: QTBUG-57255 Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc Reviewed-by: Oswald Buddenhagen --- tests/auto/auto.pro | 2 ++ tests/auto/corelib/io/io.pro | 5 +++++ tests/auto/corelib/itemmodels/itemmodels.pro | 10 +++++++--- tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro | 6 ++++-- tests/auto/corelib/thread/thread.pro | 6 +++++- tests/auto/corelib/xml/xml.pro | 2 +- tests/auto/dbus/dbus.pro | 3 +++ tests/auto/gui/text/text.pro | 4 ++++ 8 files changed, 31 insertions(+), 7 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index d3c4d470f5..f4ab0d8464 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -31,6 +31,8 @@ else:!qtConfig(process): SUBDIRS -= tools !qtHaveModule(concurrent): SUBDIRS -= concurrent !qtHaveModule(network): SUBDIRS -= network !qtHaveModule(dbus): SUBDIRS -= dbus +!qtHaveModule(xml): SUBDIRS -= xml +!qtHaveModule(sql): SUBDIRS -= sql # Disable the QtDBus tests if we can't connect to the session bus !cross_compile:qtHaveModule(dbus) { diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro index 5e20f5de5c..ec2c803012 100644 --- a/tests/auto/corelib/io/io.pro +++ b/tests/auto/corelib/io/io.pro @@ -49,6 +49,11 @@ SUBDIRS=\ qprocess \ qtextstream +!qtHaveModule(concurrent): SUBDIRS -= \ + qdebug \ + qlockfile \ + qurl + !qtConfig(private_tests): SUBDIRS -= \ qabstractfileengine \ qfileinfo \ diff --git a/tests/auto/corelib/itemmodels/itemmodels.pro b/tests/auto/corelib/itemmodels/itemmodels.pro index 7e0e3a0944..c1d75cc2cb 100644 --- a/tests/auto/corelib/itemmodels/itemmodels.pro +++ b/tests/auto/corelib/itemmodels/itemmodels.pro @@ -8,6 +8,10 @@ qtHaveModule(gui): SUBDIRS += \ qidentityproxymodel \ qitemselectionmodel \ -qtHaveModule(widgets): SUBDIRS += \ - qitemmodel \ - qsortfilterproxymodel \ +qtHaveModule(widgets) { + SUBDIRS += \ + qsortfilterproxymodel + + qtHaveModule(sql): SUBDIRS += \ + qitemmodel +} diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro index 536a6b64de..f821702564 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro @@ -1,3 +1,5 @@ TEMPLATE = subdirs -SUBDIRS = qmimedatabase-xml -unix:!mac:!qnx: SUBDIRS += qmimedatabase-cache +qtHaveModule(concurrent) { + SUBDIRS = qmimedatabase-xml + unix:!darwin:!qnx: SUBDIRS += qmimedatabase-cache +} diff --git a/tests/auto/corelib/thread/thread.pro b/tests/auto/corelib/thread/thread.pro index f18dad6a4c..d3c669859b 100644 --- a/tests/auto/corelib/thread/thread.pro +++ b/tests/auto/corelib/thread/thread.pro @@ -6,7 +6,6 @@ SUBDIRS=\ qresultstore \ qfuture \ qfuturesynchronizer \ - qfuturewatcher \ qmutex \ qmutexlocker \ qreadlocker \ @@ -18,3 +17,8 @@ SUBDIRS=\ qthreadstorage \ qwaitcondition \ qwritelocker + +qtHaveModule(concurrent) { + SUBDIRS += \ + qfuturewatcher +} diff --git a/tests/auto/corelib/xml/xml.pro b/tests/auto/corelib/xml/xml.pro index 20519edf1b..374e695aa7 100644 --- a/tests/auto/corelib/xml/xml.pro +++ b/tests/auto/corelib/xml/xml.pro @@ -1,3 +1,3 @@ TEMPLATE=subdirs -qtHaveModule(network): SUBDIRS= \ +qtHaveModule(network):qtHaveModule(xml): SUBDIRS= \ qxmlstream diff --git a/tests/auto/dbus/dbus.pro b/tests/auto/dbus/dbus.pro index 2c58d7e235..6878c9341d 100644 --- a/tests/auto/dbus/dbus.pro +++ b/tests/auto/dbus/dbus.pro @@ -34,3 +34,6 @@ SUBDIRS+=\ qdbusabstractinterface \ qdbusinterface \ qdbusmarshall + +!qtHaveModule(xml): SUBDIRS -= \ + qdbusxmlparser diff --git a/tests/auto/gui/text/text.pro b/tests/auto/gui/text/text.pro index d1a3eda4fc..6b033fb506 100644 --- a/tests/auto/gui/text/text.pro +++ b/tests/auto/gui/text/text.pro @@ -35,3 +35,7 @@ win32:SUBDIRS -= qtextpiecetable qtextpiecetable \ qzip \ qtextodfwriter + +!qtHaveModule(xml): SUBDIRS -= \ + qcssparser \ + qtextdocument -- cgit v1.2.3