travis-ci: save prove state for the 32 bit Linux build
[gitweb.git] / ci / lib-travisci.sh
index 9c4ae9bdd0aa57027304425948dc32009a518f96..348fe3c3c1d304f9887c24e023a90123ad43d0c8 100755 (executable)
@@ -14,7 +14,7 @@ skip_branch_tip_with_tag () {
        # of a tag.
 
        if TAG=$(git describe --exact-match "$TRAVIS_BRANCH" 2>/dev/null) &&
-               $TAG != $TRAVIS_BRANCH
+               test "$TAG" != "$TRAVIS_BRANCH"
        then
                echo "Tip of $TRAVIS_BRANCH is exactly at $TAG"
                exit 0
@@ -22,7 +22,45 @@ skip_branch_tip_with_tag () {
 }
 
 # Set 'exit on error' for all CI scripts to let the caller know that
-# something went wrong
-set -e
+# something went wrong.
+# Set tracing executed commands, primarily setting environment variables
+# and installing dependencies.
+set -ex
 
 skip_branch_tip_with_tag
+
+if test -z "$jobname"
+then
+       jobname="$TRAVIS_OS_NAME-$CC"
+fi
+
+export DEVELOPER=1
+export DEFAULT_TEST_TARGET=prove
+export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
+export GIT_TEST_OPTS="--verbose-log"
+export GIT_TEST_CLONE_2GB=YesPlease
+
+case "$jobname" in
+linux-clang|linux-gcc)
+       export GIT_TEST_HTTPD=YesPlease
+
+       # The Linux build installs the defined dependency versions below.
+       # The OS X build installs the latest available versions. Keep that
+       # in mind when you encounter a broken OS X build!
+       export LINUX_P4_VERSION="16.2"
+       export LINUX_GIT_LFS_VERSION="1.5.2"
+
+       P4_PATH="$(pwd)/custom/p4"
+       GIT_LFS_PATH="$(pwd)/custom/git-lfs"
+       export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
+       ;;
+osx-clang|osx-gcc)
+       # t9810 occasionally fails on Travis CI OS X
+       # t9816 occasionally fails with "TAP out of sequence errors" on
+       # Travis CI OS X
+       export GIT_SKIP_TESTS="t9810 t9816"
+       ;;
+GETTEXT_POISON)
+       export GETTEXT_POISON=YesPlease
+       ;;
+esac