Skip to content

Commit 2639382

Browse files
committed
Merge branch 'sg/travis-fixes'
Assorted updates for TravisCI integration. * sg/travis-fixes: travis-ci: only print test failures if there are test results available travis-ci: save prove state for the 32 bit Linux build travis-ci: don't install default addon packages for the 32 bit Linux build travis-ci: fine tune the use of 'set -x' in 'ci/*' scripts
2 parents 02a5f25 + 677c707 commit 2639382

File tree

6 files changed

+22
-1
lines changed

6 files changed

+22
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ matrix:
4242
- env: jobname=Linux32
4343
os: linux
4444
compiler:
45+
addons:
4546
services:
4647
- docker
4748
before_install:

ci/lib-travisci.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ skip_branch_tip_with_tag () {
2222
}
2323

2424
# Set 'exit on error' for all CI scripts to let the caller know that
25-
# something went wrong
25+
# something went wrong.
26+
# Set tracing executed commands, primarily setting environment variables
27+
# and installing dependencies.
2628
set -ex
2729

2830
skip_branch_tip_with_tag

ci/print-test-failures.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55

66
. ${0%/*}/lib-travisci.sh
77

8+
# Tracing executed commands would produce too much noise in the loop below.
9+
set +x
10+
11+
if ! ls t/test-results/*.exit >/dev/null 2>/dev/null
12+
then
13+
echo "Build job failed before the tests could have been run"
14+
exit
15+
fi
16+
817
for TEST_EXIT in t/test-results/*.exit
918
do
1019
if [ "$(cat "$TEST_EXIT")" != "0" ]

ci/run-linux32-build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# run-linux32-build.sh [host-user-id]
77
#
88

9+
set -x
10+
911
# Update packages to the latest available versions
1012
linux32 --32bit i386 sh -c '
1113
apt update >/dev/null &&
@@ -25,6 +27,7 @@ test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER) &&
2527
# Build and test
2628
linux32 --32bit i386 su -m -l $CI_USER -c '
2729
cd /usr/src/git &&
30+
ln -s /tmp/travis-cache/.prove t/.prove &&
2831
make --jobs=2 &&
2932
make --quiet test
3033
'

ci/run-linux32-docker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ docker run \
1919
--env GIT_TEST_OPTS \
2020
--env GIT_TEST_CLONE_2GB \
2121
--volume "${PWD}:/usr/src/git" \
22+
--volume "${HOME}/travis-cache:/tmp/travis-cache" \
2223
daald/ubuntu32:xenial \
2324
/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)

ci/run-windows-build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ esac
6969

7070
echo "Visual Studio Team Services Build #${BUILD_ID}"
7171

72+
# Tracing execued commands would produce too much noise in the waiting
73+
# loop below.
74+
set +x
75+
7276
# Wait until build job finished
7377
STATUS=
7478
RESULT=
@@ -90,6 +94,7 @@ done
9094
# Print log
9195
echo ""
9296
echo ""
97+
set -x
9398
gfwci "action=log&buildId=$BUILD_ID" | cut -c 30-
9499

95100
# Set exit code for TravisCI

0 commit comments

Comments
 (0)