Remove 'tests' as default build part.

This requires 'configure -make tests' if you want to automatically
build autotests for a module by default.

You can still go into the individual tests/ directories and
    'qmake && make check'
to build and run the autotests.

configure -developer-build will enable the tests by default,
like it did in Qt4.

Change-Id: If4d870987de0947a8328509dcc227fa9e6284201
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Marius Storm-Olsen 2012-03-21 11:15:22 +01:00 committed by Qt by Nokia
parent b72fd8482e
commit ac02d4e7ad
2 changed files with 12 additions and 3 deletions

7
configure vendored
View File

@ -703,7 +703,7 @@ CFG_SSE=auto
CFG_FONTCONFIG=auto
CFG_LIBFREETYPE=auto
CFG_SQL_AVAILABLE=
QT_DEFAULT_BUILD_PARTS="libs examples tests"
QT_DEFAULT_BUILD_PARTS="libs examples"
CFG_BUILD_PARTS=""
CFG_NOBUILD_PARTS=""
CFG_RELEASE_QMAKE=no
@ -2698,6 +2698,11 @@ fi
if [ -z "$CFG_BUILD_PARTS" ]; then
CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
# build tests by default, if a developer build
if [ "$CFG_DEV" = "yes" ]; then
CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
fi
# don't build tools by default when cross-compiling
if [ "$PLATFORM" != "$XPLATFORM" ]; then
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`

View File

@ -176,7 +176,7 @@ Configure::Configure(int& argc, char** argv)
}
}
defaultBuildParts << QStringLiteral("libs") << QStringLiteral("examples") << QStringLiteral("tests");
defaultBuildParts << QStringLiteral("libs") << QStringLiteral("examples");
dictionary[ "QT_SOURCE_TREE" ] = fixSeparators(sourcePath);
dictionary[ "QT_BUILD_TREE" ] = fixSeparators(buildPath);
dictionary[ "QT_INSTALL_PREFIX" ] = fixSeparators(installPath);
@ -2260,8 +2260,12 @@ void Configure::generateOutputVars()
qmakeConfig += dictionary[ "BUILD" ];
dictionary[ "QMAKE_OUTDIR" ] = dictionary[ "BUILD" ];
if (buildParts.isEmpty())
if (buildParts.isEmpty()) {
buildParts = defaultBuildParts;
if (dictionary["BUILDDEV"] == "yes")
buildParts += "tests";
}
while (!nobuildParts.isEmpty())
buildParts.removeAll(nobuildParts.takeFirst());
if (!buildParts.contains("libs"))