Skip to content

Commit ac10216

Browse files
committed
ci: split the linux-gcc job into two jobs
This job was abused to not only run the test suite in a regular way but also with all kinds of `GIT_TEST_*` options set to non-default values. Let's split this into two, with the `linux-gcc` job running the default test suite, and the newly-introduced `linux-gcc-extra` job running the test suite in the "special" ways. Technically, we would have to build Git only once, but it would not be obvious how to teach Travis to transport build artifacts, so we keep it simple and just build Git in both jobs. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b697d92 commit ac10216

File tree

5 files changed

+49
-7
lines changed

5 files changed

+49
-7
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ compiler:
1616

1717
matrix:
1818
include:
19+
- env: jobname=linux-gcc-extra
20+
os: linux
21+
compiler: gcc
22+
addons:
1923
- env: jobname=GIT_TEST_GETTEXT_POISON
2024
os: linux
2125
compiler:

azure-pipelines.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,45 @@ jobs:
206206
PathtoPublish: t/failed-test-artifacts
207207
ArtifactName: failed-test-artifacts
208208

209+
- job: linux_gcc_extra
210+
displayName: linux-gcc-extra
211+
condition: succeeded()
212+
pool: Hosted Ubuntu 1604
213+
steps:
214+
- bash: |
215+
test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
216+
217+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
218+
sudo apt-get update &&
219+
sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev apache2 language-pack-is git-svn gcc-8 || exit 1
220+
221+
export jobname=linux-gcc-extra &&
222+
223+
ci/install-dependencies.sh || exit 1
224+
ci/run-build-and-tests.sh || {
225+
ci/print-test-failures.sh
226+
exit 1
227+
}
228+
229+
test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
230+
displayName: 'ci/run-build-and-tests.sh'
231+
env:
232+
GITFILESHAREPWD: $(gitfileshare.pwd)
233+
- task: PublishTestResults@2
234+
displayName: 'Publish Test Results **/TEST-*.xml'
235+
inputs:
236+
mergeTestResults: true
237+
testRunTitle: 'linux-gcc-extra'
238+
platform: Linux
239+
publishRunAttachments: false
240+
condition: succeededOrFailed()
241+
- task: PublishBuildArtifacts@1
242+
displayName: 'Publish trash directories of failed tests'
243+
condition: failed()
244+
inputs:
245+
PathtoPublish: t/failed-test-artifacts
246+
ArtifactName: failed-test-artifacts
247+
209248
- job: osx_clang
210249
displayName: osx-clang
211250
condition: succeeded()

ci/install-dependencies.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION
99
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
1010

1111
case "$jobname" in
12-
linux-clang|linux-gcc)
12+
linux-clang|linux-gcc|linux-gcc-extra)
1313
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
1414
sudo apt-get -q update
1515
sudo apt-get -q -y install language-pack-is libsvn-perl apache2
1616
case "$jobname" in
17-
linux-gcc)
17+
linux-gcc|linux-gcc-extra)
1818
sudo apt-get -q -y install gcc-8
1919
;;
2020
esac

ci/lib.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ export DEFAULT_TEST_TARGET=prove
154154
export GIT_TEST_CLONE_2GB=YesPlease
155155

156156
case "$jobname" in
157-
linux-clang|linux-gcc)
158-
if [ "$jobname" = linux-gcc ]
157+
linux-clang|linux-gcc|linux-gcc-extra)
158+
if [ "$jobname" = linux-gcc -o "$jobname" = linux-gcc-extra ]
159159
then
160160
export CC=gcc-8
161161
fi

ci/run-build-and-tests.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
1111
esac
1212

1313
make
14-
make test
15-
if test "$jobname" = "linux-gcc"
14+
if test "$jobname" = "linux-gcc-extra"
1615
then
1716
export GIT_TEST_SPLIT_INDEX=yes
1817
export GIT_TEST_FULL_IN_PACK_ARRAY=true
1918
export GIT_TEST_OE_SIZE=10
2019
export GIT_TEST_OE_DELTA_SIZE=5
2120
export GIT_TEST_COMMIT_GRAPH=1
2221
export GIT_TEST_MULTI_PACK_INDEX=1
23-
make test
2422
fi
23+
make test
2524

2625
check_unignored_build_artifacts
2726

0 commit comments

Comments
 (0)