Commit 29d5dd06 authored by Simon McVittie's avatar Simon McVittie

travis-ci: consistently use ci_* for parameter variables

This aligns it with the more generic script based on this one that
I sent to OSTree.
Signed-off-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall's avatarPhilip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
parent f6eb7c8a
...@@ -26,10 +26,10 @@ language: c ...@@ -26,10 +26,10 @@ language: c
install: install:
# travis-ci has a sources list for Chrome which doesn't support i386 # travis-ci has a sources list for Chrome which doesn't support i386
- ": | sudo tee /etc/apt/sources.list.d/google-chrome.list" - ": | sudo tee /etc/apt/sources.list.d/google-chrome.list"
- test "$dbus_ci_host" != mingw || sudo dpkg --add-architecture i386 - test "$ci_host" != mingw || sudo dpkg --add-architecture i386
- sudo apt-get -qq -y update - sudo apt-get -qq -y update
- > - >
test "$dbus_ci_host" != mingw || sudo apt-get -qq -y install test "$ci_host" != mingw || sudo apt-get -qq -y install
binutils-mingw-w64-i686 g++-mingw-w64-i686 wine:i386 binutils-mingw-w64-i686 g++-mingw-w64-i686 wine:i386
- sudo apt-get -qq -y build-dep dbus - sudo apt-get -qq -y build-dep dbus
- > - >
...@@ -65,16 +65,16 @@ install: ...@@ -65,16 +65,16 @@ install:
script: script:
# python-dbus and python-gi aren't available to Travis's version of # python-dbus and python-gi aren't available to Travis's version of
# Python in /opt, which it uses as a default # Python in /opt, which it uses as a default
- PYTHON=/usr/bin/python dbus_ci_parallel=2 dbus_ci_sudo=yes ./tools/ci-build.sh - PYTHON=/usr/bin/python ci_parallel=2 ci_sudo=yes ./tools/ci-build.sh
env: env:
- dbus_ci_variant=production - ci_variant=production
- dbus_ci_variant=debug - ci_variant=debug
- dbus_ci_variant=reduced - ci_variant=reduced
- dbus_ci_variant=legacy - ci_variant=legacy
- dbus_ci_buildsys=cmake - ci_buildsys=cmake
- dbus_ci_host=mingw - ci_host=mingw
- dbus_ci_host=mingw dbus_ci_variant=debug - ci_host=mingw ci_variant=debug
- dbus_ci_host=mingw dbus_ci_buildsys=cmake - ci_host=mingw ci_buildsys=cmake
# vim:set sw=2 sts=2 et: # vim:set sw=2 sts=2 et:
...@@ -25,34 +25,34 @@ ...@@ -25,34 +25,34 @@
set -e set -e
set -x set -x
if [ -z "$dbus_ci_variant" ]; then if [ -z "$ci_variant" ]; then
dbus_ci_variant=production ci_variant=production
fi fi
if [ -z "$dbus_ci_host" ]; then if [ -z "$ci_host" ]; then
dbus_ci_host=native ci_host=native
fi fi
if [ -z "$dbus_ci_buildsys" ]; then if [ -z "$ci_buildsys" ]; then
dbus_ci_buildsys=autotools ci_buildsys=autotools
fi fi
if [ -z "$dbus_ci_parallel" ]; then if [ -z "$ci_parallel" ]; then
dbus_ci_parallel=1 ci_parallel=1
fi fi
dbus_test=yes ci_test=yes
dbus_test_fatal=yes ci_test_fatal=yes
NOCONFIGURE=1 ./autogen.sh NOCONFIGURE=1 ./autogen.sh
srcdir="$(pwd)" srcdir="$(pwd)"
mkdir ci-build-${dbus_ci_variant}-${dbus_ci_host} mkdir ci-build-${ci_variant}-${ci_host}
cd ci-build-${dbus_ci_variant}-${dbus_ci_host} cd ci-build-${ci_variant}-${ci_host}
make="make -j${dbus_ci_parallel} V=1 VERBOSE=1" make="make -j${ci_parallel} V=1 VERBOSE=1"
case "$dbus_ci_host" in case "$ci_host" in
(mingw) (mingw)
mirror=http://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/ mirror=http://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/
mingw="$(pwd)/mingw32" mingw="$(pwd)/mingw32"
...@@ -77,9 +77,9 @@ case "$dbus_ci_host" in ...@@ -77,9 +77,9 @@ case "$dbus_ci_host" in
;; ;;
esac esac
case "$dbus_ci_buildsys" in case "$ci_buildsys" in
(autotools) (autotools)
case "$dbus_ci_variant" in case "$ci_variant" in
(debug) (debug)
# Full developer/debug build. # Full developer/debug build.
set _ "$@" set _ "$@"
...@@ -141,7 +141,7 @@ case "$dbus_ci_buildsys" in ...@@ -141,7 +141,7 @@ case "$dbus_ci_buildsys" in
;; ;;
esac esac
case "$dbus_ci_host" in case "$ci_host" in
(mingw) (mingw)
set _ "$@" set _ "$@"
set "$@" --build="$(build-aux/config.guess)" set "$@" --build="$(build-aux/config.guess)"
...@@ -152,9 +152,9 @@ case "$dbus_ci_buildsys" in ...@@ -152,9 +152,9 @@ case "$dbus_ci_buildsys" in
set "$@" CXXFLAGS=-static-libgcc set "$@" CXXFLAGS=-static-libgcc
# don't run tests yet, Wine needs Xvfb and # don't run tests yet, Wine needs Xvfb and
# more msys2 libraries # more msys2 libraries
dbus_test= ci_test=
# don't "make install" system-wide # don't "make install" system-wide
dbus_ci_sudo= ci_sudo=
shift shift
;; ;;
esac esac
...@@ -167,35 +167,35 @@ case "$dbus_ci_buildsys" in ...@@ -167,35 +167,35 @@ case "$dbus_ci_buildsys" in
"$@" "$@"
${make} ${make}
[ -z "$dbus_test" ] || ${make} check || [ -z "$dbus_test_fatal" ] [ -z "$ci_test" ] || ${make} check || [ -z "$ci_test_fatal" ]
cat test/test-suite.log || : cat test/test-suite.log || :
[ -z "$dbus_test" ] || ${make} distcheck || \ [ -z "$ci_test" ] || ${make} distcheck || \
[ -z "$dbus_test_fatal" ] [ -z "$ci_test_fatal" ]
${make} install DESTDIR=$(pwd)/DESTDIR ${make} install DESTDIR=$(pwd)/DESTDIR
( cd DESTDIR && find . ) ( cd DESTDIR && find . )
if [ -n "$dbus_ci_sudo" ] && [ -n "$dbus_test" ]; then if [ -n "$ci_sudo" ] && [ -n "$ci_test" ]; then
sudo ${make} install sudo ${make} install
LD_LIBRARY_PATH=/usr/local/lib ${make} installcheck || \ LD_LIBRARY_PATH=/usr/local/lib ${make} installcheck || \
[ -z "$dbus_test_fatal" ] [ -z "$ci_test_fatal" ]
cat test/test-suite.log || : cat test/test-suite.log || :
# re-run them with gnome-desktop-testing # re-run them with gnome-desktop-testing
env LD_LIBRARY_PATH=/usr/local/lib \ env LD_LIBRARY_PATH=/usr/local/lib \
gnome-desktop-testing-runner -d /usr/local/share dbus/ || \ gnome-desktop-testing-runner -d /usr/local/share dbus/ || \
[ -z "$dbus_test_fatal" ] [ -z "$ci_test_fatal" ]
# these tests benefit from being re-run as root # these tests benefit from being re-run as root
sudo env LD_LIBRARY_PATH=/usr/local/lib \ sudo env LD_LIBRARY_PATH=/usr/local/lib \
gnome-desktop-testing-runner -d /usr/local/share \ gnome-desktop-testing-runner -d /usr/local/share \
dbus/test-uid-permissions_with_config.test || \ dbus/test-uid-permissions_with_config.test || \
[ -z "$dbus_test_fatal" ] [ -z "$ci_test_fatal" ]
fi fi
;; ;;
(cmake) (cmake)
case "$dbus_ci_host" in case "$ci_host" in
(mingw) (mingw)
set _ "$@" set _ "$@"
set "$@" -D CMAKE_TOOLCHAIN_FILE="${srcdir}/cmake/i686-w64-mingw32.cmake" set "$@" -D CMAKE_TOOLCHAIN_FILE="${srcdir}/cmake/i686-w64-mingw32.cmake"
...@@ -209,7 +209,7 @@ case "$dbus_ci_buildsys" in ...@@ -209,7 +209,7 @@ case "$dbus_ci_buildsys" in
shift shift
# don't run tests yet, Wine needs Xvfb and more # don't run tests yet, Wine needs Xvfb and more
# msys2 libraries # msys2 libraries
dbus_test= ci_test=
;; ;;
esac esac
...@@ -219,7 +219,7 @@ case "$dbus_ci_buildsys" in ...@@ -219,7 +219,7 @@ case "$dbus_ci_buildsys" in
# The test coverage for OOM-safety is too verbose to be useful on # The test coverage for OOM-safety is too verbose to be useful on
# travis-ci. # travis-ci.
export DBUS_TEST_MALLOC_FAILURES=0 export DBUS_TEST_MALLOC_FAILURES=0
[ -z "$dbus_test" ] || ctest -VV || [ -z "$dbus_test_fatal" ] [ -z "$ci_test" ] || ctest -VV || [ -z "$ci_test_fatal" ]
${make} install DESTDIR=$(pwd)/DESTDIR ${make} install DESTDIR=$(pwd)/DESTDIR
( cd DESTDIR && find . ) ( cd DESTDIR && find . )
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment