summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-11-17 15:39:19 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-23 00:13:46 +0100
commit9ffd7a339f0da644c95e71583134263c06745ed5 (patch)
tree4407a01b28fffdd0474f60ae367ec6551737f82f /configure
parenta25d0ef3c24286602f7d9e80206b37f8ada7ac04 (diff)
downloadqtbase-9ffd7a339f0da644c95e71583134263c06745ed5.tar.gz
Added build system support for installing tests.
Tests will install under $$[QT_INSTALL_TESTS]. TESTDATA may be used to install additional testdata required by the test. The default install rule may be disabled by CONFIG+=no_testcase_installs. Change-Id: I204de60c8e844775906ffd016ca50bffbb414142 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 24 insertions, 2 deletions
diff --git a/configure b/configure
index f6b629ad84..220482adba 100755
--- a/configure
+++ b/configure
@@ -848,6 +848,7 @@ QT_INSTALL_DATA=
QT_INSTALL_TRANSLATIONS=
QT_INSTALL_SETTINGS=
QT_INSTALL_EXAMPLES=
+QT_INSTALL_TESTS=
QT_HOST_PREFIX=
#flags for SQL drivers
@@ -1055,7 +1056,7 @@ while [ "$#" -gt 0 ]; do
shift
VAL=$1
;;
- -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
@@ -1313,6 +1314,9 @@ while [ "$#" -gt 0 ]; do
examplesdir)
QT_INSTALL_EXAMPLES="$VAL"
;;
+ testsdir)
+ QT_INSTALL_TESTS="$VAL"
+ ;;
qconfig)
CFG_QCONFIG="$VAL"
;;
@@ -3617,6 +3621,17 @@ if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
fi
QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
+#tests
+if [ -z "$QT_INSTALL_TESTS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_TESTS="/Developer/Tests/Qt"
+ fi
+ fi
+ [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
+fi
+QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
+
#-------------------------------------------------------------------------------
# help - interactive parts of the script _after_ this section please
#-------------------------------------------------------------------------------
@@ -3693,7 +3708,7 @@ if [ "$OPT_HELP" = "yes" ]; then
cat <<EOF
Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
[-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
- [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
+ [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
[-release] [-debug] [-debug-and-release]
[-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
[-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
@@ -3771,6 +3786,8 @@ cat <<EOF
(default PREFIX/etc/settings)
-examplesdir <dir> .... Examples will be installed to <dir>
(default PREFIX/examples)
+ -testsdir <dir> ....... Tests will be installed to <dir>
+ (default PREFIX/tests)
Configure options:
@@ -4616,6 +4633,7 @@ DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTA
TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
+TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
TODAY=`date +%Y-%m-%d`
cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
@@ -4640,6 +4658,7 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then
HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
+ HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
@@ -4656,6 +4675,7 @@ static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PAT
static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
+static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
#else // QT_BOOTSTRAPPED
EOF
fi
@@ -4673,6 +4693,7 @@ static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_ST
static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
+static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
EOF
if [ ! -z "$QT_HOST_PREFIX" ]; then
@@ -4697,6 +4718,7 @@ cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
+#define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
EOF
# avoid unecessary rebuilds by copying only if qconfig.cpp has changed