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
install:
# travis-ci has a sources list for Chrome which doesn't support i386
- ": | 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
- >
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
- sudo apt-get -qq -y build-dep dbus
- >
......@@ -65,16 +65,16 @@ install:
script:
# python-dbus and python-gi aren't available to Travis's version of
# 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:
- dbus_ci_variant=production
- dbus_ci_variant=debug
- dbus_ci_variant=reduced
- dbus_ci_variant=legacy
- dbus_ci_buildsys=cmake
- dbus_ci_host=mingw
- dbus_ci_host=mingw dbus_ci_variant=debug
- dbus_ci_host=mingw dbus_ci_buildsys=cmake
- ci_variant=production
- ci_variant=debug
- ci_variant=reduced
- ci_variant=legacy
- ci_buildsys=cmake
- ci_host=mingw
- ci_host=mingw ci_variant=debug
- ci_host=mingw ci_buildsys=cmake
# vim:set sw=2 sts=2 et:
......@@ -25,34 +25,34 @@
set -e
set -x
if [ -z "$dbus_ci_variant" ]; then
dbus_ci_variant=production
if [ -z "$ci_variant" ]; then
ci_variant=production
fi
if [ -z "$dbus_ci_host" ]; then
dbus_ci_host=native
if [ -z "$ci_host" ]; then
ci_host=native
fi
if [ -z "$dbus_ci_buildsys" ]; then
dbus_ci_buildsys=autotools
if [ -z "$ci_buildsys" ]; then
ci_buildsys=autotools
fi
if [ -z "$dbus_ci_parallel" ]; then
dbus_ci_parallel=1
if [ -z "$ci_parallel" ]; then
ci_parallel=1
fi
dbus_test=yes
dbus_test_fatal=yes
ci_test=yes
ci_test_fatal=yes
NOCONFIGURE=1 ./autogen.sh
srcdir="$(pwd)"
mkdir ci-build-${dbus_ci_variant}-${dbus_ci_host}
cd ci-build-${dbus_ci_variant}-${dbus_ci_host}
mkdir ci-build-${ci_variant}-${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)
mirror=http://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/
mingw="$(pwd)/mingw32"
......@@ -77,9 +77,9 @@ case "$dbus_ci_host" in
;;
esac
case "$dbus_ci_buildsys" in
case "$ci_buildsys" in
(autotools)
case "$dbus_ci_variant" in
case "$ci_variant" in
(debug)
# Full developer/debug build.
set _ "$@"
......@@ -141,7 +141,7 @@ case "$dbus_ci_buildsys" in
;;
esac
case "$dbus_ci_host" in
case "$ci_host" in
(mingw)
set _ "$@"
set "$@" --build="$(build-aux/config.guess)"
......@@ -152,9 +152,9 @@ case "$dbus_ci_buildsys" in
set "$@" CXXFLAGS=-static-libgcc
# don't run tests yet, Wine needs Xvfb and
# more msys2 libraries
dbus_test=
ci_test=
# don't "make install" system-wide
dbus_ci_sudo=
ci_sudo=
shift
;;
esac
......@@ -167,35 +167,35 @@ case "$dbus_ci_buildsys" in
"$@"
${make}
[ -z "$dbus_test" ] || ${make} check || [ -z "$dbus_test_fatal" ]
[ -z "$ci_test" ] || ${make} check || [ -z "$ci_test_fatal" ]
cat test/test-suite.log || :
[ -z "$dbus_test" ] || ${make} distcheck || \
[ -z "$dbus_test_fatal" ]
[ -z "$ci_test" ] || ${make} distcheck || \
[ -z "$ci_test_fatal" ]
${make} install DESTDIR=$(pwd)/DESTDIR
( cd DESTDIR && find . )
if [ -n "$dbus_ci_sudo" ] && [ -n "$dbus_test" ]; then
if [ -n "$ci_sudo" ] && [ -n "$ci_test" ]; then
sudo ${make} install
LD_LIBRARY_PATH=/usr/local/lib ${make} installcheck || \
[ -z "$dbus_test_fatal" ]
[ -z "$ci_test_fatal" ]
cat test/test-suite.log || :
# re-run them with gnome-desktop-testing
env LD_LIBRARY_PATH=/usr/local/lib \
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
sudo env LD_LIBRARY_PATH=/usr/local/lib \
gnome-desktop-testing-runner -d /usr/local/share \
dbus/test-uid-permissions_with_config.test || \
[ -z "$dbus_test_fatal" ]
[ -z "$ci_test_fatal" ]
fi
;;
(cmake)
case "$dbus_ci_host" in
case "$ci_host" in
(mingw)
set _ "$@"
set "$@" -D CMAKE_TOOLCHAIN_FILE="${srcdir}/cmake/i686-w64-mingw32.cmake"
......@@ -209,7 +209,7 @@ case "$dbus_ci_buildsys" in
shift
# don't run tests yet, Wine needs Xvfb and more
# msys2 libraries
dbus_test=
ci_test=
;;
esac
......@@ -219,7 +219,7 @@ case "$dbus_ci_buildsys" in
# The test coverage for OOM-safety is too verbose to be useful on
# travis-ci.
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
( 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