diff options
Diffstat (limited to 'scripts/build-qbs-with-qbs.sh')
-rwxr-xr-x | scripts/build-qbs-with-qbs.sh | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/scripts/build-qbs-with-qbs.sh b/scripts/build-qbs-with-qbs.sh index deb3a138b..6b6f6d2a9 100755 --- a/scripts/build-qbs-with-qbs.sh +++ b/scripts/build-qbs-with-qbs.sh @@ -40,12 +40,6 @@ set -e # -# It might be desired to keep settings for Qbs testing -# in a separate folder. -# -export QBS_AUTOTEST_SETTINGS_DIR="${QBS_AUTOTEST_SETTINGS_DIR:-/tmp/qbs-settings}" - -# # Qbs is built with the address sanitizer enabled. # Suppress findings in some parts of Qbs / dependencies. # @@ -60,6 +54,7 @@ BUILD_OPTIONS="\ modules.qbsbuildconfig.enableProjectFileUpdates:true \ modules.qbsbuildconfig.enableUnitTests:true \ project.withExamples:true \ + ${BUILD_OPTIONS} " # @@ -67,7 +62,11 @@ BUILD_OPTIONS="\ # qbs resolve ${BUILD_OPTIONS} qbs build ${BUILD_OPTIONS} -qbs build -p "qbs documentation" ${BUILD_OPTIONS} + +WITH_DOCS=${WITH_DOCS:-1} +if [ "$WITH_DOCS" -ne 0 ]; then + qbs build -p "qbs documentation" ${BUILD_OPTIONS} +fi # # Set up profiles for the freshly built Qbs if not @@ -76,6 +75,7 @@ qbs build -p "qbs documentation" ${BUILD_OPTIONS} if [ -z "${QBS_AUTOTEST_PROFILE}" ]; then export QBS_AUTOTEST_PROFILE=autotestprofile + export QBS_AUTOTEST_SETTINGS_DIR=`mktemp -d 2>/dev/null || mktemp -d -t 'qbs-settings'` RUN_OPTIONS="\ --settings-dir ${QBS_AUTOTEST_SETTINGS_DIR} \ @@ -89,9 +89,16 @@ if [ -z "${QBS_AUTOTEST_PROFILE}" ]; then ${RUN_OPTIONS} \ "${QMAKE_PATH:-$(which qmake)}" ${QBS_AUTOTEST_PROFILE} - qbs run -p qbs_app ${BUILD_OPTIONS} -- config \ - ${RUN_OPTIONS} \ - ${QBS_AUTOTEST_PROFILE}.baseProfile gcc + # Make sure that the Qt profile uses the same toolchain profile + # that was used for building in case a custom QBS_BUILD_PROFILE + # was set. Otherwise setup-qt automatically uses the default + # toolchain profile. + if [ ! -z "${QBS_BUILD_PROFILE}" ]; then + QBS_BUILD_BASE_PROFILE=$(qbs config ${QBS_BUILD_PROFILE}.baseProfile | cut -d: -f2) + qbs run -p qbs_app ${BUILD_OPTIONS} -- config \ + ${RUN_OPTIONS} \ + ${QBS_AUTOTEST_PROFILE}.baseProfile ${QBS_BUILD_BASE_PROFILE} + fi # QBS_AUTOTEST_PROFILE has been added to the environment # which requires a resolve step @@ -99,6 +106,10 @@ if [ -z "${QBS_AUTOTEST_PROFILE}" ]; then fi # -# Run all autotests with QBS_AUTOTEST_PROFILE +# Run all autotests with QBS_AUTOTEST_PROFILE. Some test cases might run for +# over 10 minutes. Output an empty line every 9:50 minutes to prevent a 10min +# timeout on Travis CI. # +(while true; do echo "" && sleep 590; done) & +trap "kill $!" EXIT qbs build -p "autotest-runner" ${BUILD_OPTIONS} |