mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
a1157b76eb
Commit 657343a60
(travis-ci: move Travis CI code into dedicated
scripts, 2017-09-10) converted '.travis.yml's default 'before_install'
scriptlet to the 'ci/install-dependencies.sh' script, and while doing
so moved setting GIT_TEST_HTTPD=YesPlease for the 64-bit GCC and Clang
Linux build jobs to that script. This is wrong for two reasons:
- The purpose of that script is, as its name suggests, to install
dependencies, not to set any environment variables influencing
which tests should be run (though, arguably, this was already an
issue with the original 'before_install' scriptlet).
- Setting the variable has no effect anymore, because that script is
run in a separate shell process, and the variable won't be visible
in any of the other scripts, notably in 'ci/run-tests.sh'
responsible for, well, running the tests.
Luckily, this didn't have a negative effect on our Travis CI build
jobs, because GIT_TEST_HTTPD is a tri-state variable defaulting to
"auto" and a functioning web server was installed in those Linux build
jobs, so the httpd tests were run anyway.
Apparently the httpd tests run just fine without GIT_TEST_HTTPD being
set, therefore we could simply remove this environment variable.
However, if a bug were to creep in to change the Travis CI build
environment to run the tests as root or to not install Apache, then
the httpd tests would be skipped and the build job would still
succeed. We would only notice if someone actually were to look
through the build job's trace log; but who would look at the trace log
of a successful build job?!
Since httpd tests are important, we do want to run them and we want to
be loudly reminded if they can't be run. Therefore, move setting
GIT_TEST_HTTPD=YesPlease for the 64-bit GCC and Clang Linux build jobs
to 'ci/lib-travisci.sh' to ensure that the build job fails when the
httpd tests can't be run. (We could set it in 'ci/run-tests.sh' just
as well, but it's better to keep all environment variables in one
place in 'ci/lib-travisci.sh'.)
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
42 lines
1.2 KiB
Bash
Executable file
42 lines
1.2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Install dependencies required to build and test Git on Linux and macOS
|
|
#
|
|
|
|
. ${0%/*}/lib-travisci.sh
|
|
|
|
P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION
|
|
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
|
|
|
|
case "$jobname" in
|
|
linux-clang|linux-gcc)
|
|
mkdir --parents "$P4_PATH"
|
|
pushd "$P4_PATH"
|
|
wget --quiet "$P4WHENCE/bin.linux26x86_64/p4d"
|
|
wget --quiet "$P4WHENCE/bin.linux26x86_64/p4"
|
|
chmod u+x p4d
|
|
chmod u+x p4
|
|
popd
|
|
mkdir --parents "$GIT_LFS_PATH"
|
|
pushd "$GIT_LFS_PATH"
|
|
wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
|
tar --extract --gunzip --file "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
|
cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs .
|
|
popd
|
|
;;
|
|
osx-clang|osx-gcc)
|
|
brew update --quiet
|
|
# Uncomment this if you want to run perf tests:
|
|
# brew install gnu-time
|
|
brew install git-lfs gettext
|
|
brew link --force gettext
|
|
brew install caskroom/cask/perforce
|
|
;;
|
|
esac
|
|
|
|
echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
|
|
p4d -V | grep Rev.
|
|
echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
|
|
p4 -V | grep Rev.
|
|
echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
|
|
git-lfs version
|