1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/bin/bash
set -e
set -o pipefail
shopt -s inherit_errexit # #514862, wtf
# Wrapper to run the tests in gitlab CI
x () { echo >&2 "+ $*"; "$@"; }
# Rebuild dgit-infrastructure because it can gain a versioned dependency on
# init-system-helpers that isn't satisfied by the stable release we may now be
# testing on. This happens when d/rules exports DH_COMPAT=14 when running
# dh_installsystemduser.
x apt-get -y install --no-install-recommends --mark-auto \
build-essential debhelper gettext po4a tcl
x rm debian/output/dgit-infrastructure_*.deb
x dpkg-buildpackage -uc -b -tc
x mv ../dgit-infrastructure_*.deb debian/output
x rm ../*.deb
x apt-get -y autoremove --purge
tests/install-deps-remove-debs --our-debs-dir=./debian/output
# This timeout is per test case, but becauswe of our gnupg serialisation,
# in principle, a test case might end up waiting for ages and ages for
# other test cases. Empirically, locally, I have seen very alphabetically
# early test cases being the last ones to finish. This is mad.
# Anyway, we must therefore set this long for the whole test suite.
export DGIT_TEST_RUN_PFX='timeout 2500'
x eatmydata tests/using-intree tests/run-all "$@"
|