From 9ffd7a339f0da644c95e71583134263c06745ed5 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Thu, 17 Nov 2011 15:39:19 +1000 Subject: 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 --- configure | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'configure') 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 <] [-prefix-install] [-bindir ] [-libdir ] [-docdir ] [-headerdir ] [-plugindir ] [-importdir ] [-datadir ] - [-translationdir ] [-sysconfdir ] [-examplesdir ] + [-translationdir ] [-sysconfdir ] [-examplesdir ] [-testsdir ] [-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 < .... Examples will be installed to (default PREFIX/examples) + -testsdir ....... Tests will be installed to + (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" <> "$outpath/src/corelib/global/qconfig.cpp.new" <> "$outpath/src/corelib/global/qconfig.cpp.new" <