Skip to content

Commit e3371e9

Browse files
szedergitster
authored andcommitted
travis-ci: move setting environment variables to 'ci/lib-travisci.sh'
Our '.travis.yml's 'env.global' section sets a bunch of environment variables for all build jobs, though none of them actually affects all build jobs. It's convenient for us, and in most cases it works just fine, because irrelevant environment variables are simply ignored. However, $GIT_SKIP_TESTS is an exception: it tells the test harness to skip the two test scripts that are prone to occasional failures on OSX, but as it's set for all build jobs those tests are not run in any of the build jobs that are capable to run them reliably, either. Therefore $GIT_SKIP_TESTS should only be set in the OSX build jobs, but those build jobs are included in the build matrix implicitly (i.e. by combining the matrix keys 'os' and 'compiler'), and there is no way to set an environment variable only for a subset of those implicit build jobs. (Unless we were to add new scriptlets to '.travis.yml', which is exactly the opposite direction that we took with commit 657343a (travis-ci: move Travis CI code into dedicated scripts, 2017-09-10)). So move setting $GIT_SKIP_TESTS to 'ci/lib-travisci.sh', where it can trivially be set only for the OSX build jobs. Furthermore, move setting all other environment variables from '.travis.yml' to 'ci/lib-travisci.sh', too, because a couple of environment variables are already set there, and this way all environment variables will be set in the same place. All the logic controlling our builds is already in the 'ci/*' scripts anyway, so there is really no good reason to keep the environment variables separately. Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bf427a9 commit e3371e9

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

.travis.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,9 @@ addons:
2121
- git-svn
2222
- apache2
2323

24-
env:
25-
global:
26-
- DEVELOPER=1
27-
# The Linux build installs the defined dependency versions below.
28-
# The OS X build installs the latest available versions. Keep that
29-
# in mind when you encounter a broken OS X build!
30-
- LINUX_P4_VERSION="16.2"
31-
- LINUX_GIT_LFS_VERSION="1.5.2"
32-
- DEFAULT_TEST_TARGET=prove
33-
- GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
34-
- GIT_TEST_OPTS="--verbose-log"
35-
- GIT_TEST_CLONE_2GB=YesPlease
36-
# t9810 occasionally fails on Travis CI OS X
37-
# t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
38-
- GIT_SKIP_TESTS="t9810 t9816"
39-
4024
matrix:
4125
include:
42-
- env: jobname=GETTEXT_POISON GETTEXT_POSION=YesPlease
26+
- env: jobname=GETTEXT_POISON
4327
os: linux
4428
compiler:
4529
addons:

ci/lib-travisci.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,31 @@ then
3232
jobname="$TRAVIS_OS_NAME-$CC"
3333
fi
3434

35+
export DEVELOPER=1
36+
export DEFAULT_TEST_TARGET=prove
37+
export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
38+
export GIT_TEST_OPTS="--verbose-log"
39+
export GIT_TEST_CLONE_2GB=YesPlease
40+
3541
case "$jobname" in
3642
linux-clang|linux-gcc)
43+
# The Linux build installs the defined dependency versions below.
44+
# The OS X build installs the latest available versions. Keep that
45+
# in mind when you encounter a broken OS X build!
46+
export LINUX_P4_VERSION="16.2"
47+
export LINUX_GIT_LFS_VERSION="1.5.2"
48+
3749
P4_PATH="$(pwd)/custom/p4"
3850
GIT_LFS_PATH="$(pwd)/custom/git-lfs"
3951
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
4052
;;
53+
osx-clang|osx-gcc)
54+
# t9810 occasionally fails on Travis CI OS X
55+
# t9816 occasionally fails with "TAP out of sequence errors" on
56+
# Travis CI OS X
57+
export GIT_SKIP_TESTS="t9810 t9816"
58+
;;
59+
GETTEXT_POISON)
60+
export GETTEXT_POISON=YesPlease
61+
;;
4162
esac

0 commit comments

Comments
 (0)