diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-01-09 11:23:10 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-22 15:55:55 +0000 |
commit | 329385a5d53f7c20d25b8b492acdd45a5c5ff194 (patch) | |
tree | 6353bee521ffec232ad6944f511da373bca45678 /tests | |
parent | c587036dc630bc3cd00ad5ffc1529f25df185a26 (diff) |
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 <oswald.buddenhagen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/auto.pro | 2 | ||||
-rw-r--r-- | tests/auto/corelib/io/io.pro | 5 | ||||
-rw-r--r-- | tests/auto/corelib/itemmodels/itemmodels.pro | 10 | ||||
-rw-r--r-- | tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro | 6 | ||||
-rw-r--r-- | tests/auto/corelib/thread/thread.pro | 6 | ||||
-rw-r--r-- | tests/auto/corelib/xml/xml.pro | 2 | ||||
-rw-r--r-- | tests/auto/dbus/dbus.pro | 3 | ||||
-rw-r--r-- | tests/auto/gui/text/text.pro | 4 | ||||
-rw-r--r-- | tests/tests.pro | 2 |
9 files changed, 33 insertions, 7 deletions
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 diff --git a/tests/tests.pro b/tests/tests.pro index 346102ab7b..a3ca94a94f 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -1,5 +1,7 @@ TEMPLATE = subdirs CONFIG += no_docs_target +requires(qtHaveModule(testlib)) + SUBDIRS = auto # benchmarks in debug mode is rarely sensible |