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 32
|
#!/bin/sh
#
# Install packages for integration tests.
#
# This script is normally run via sudo in a test container or VM, such as via
# GitHub Actions.
#
# Copyright 2016, 2018-2020 Russ Allbery <eagle@eyrie.org>
#
# SPDX-License-Identifier: MIT
set -eux
# Normally, KERBEROS is set based on the CI matrix, but provide a default in
# case someone runs this test by hand.
KERBEROS="${KERBEROS:-mit}"
# Install apt packages.
apt-get update
apt-get install $(grep -v '^#' ci/apt-packages)
# If not running as a GitHub workflow, also install Perl packages. Under the
# GitHub workflow, this will be done (and cached) by actions.
if [ -z "${GITHUB_WORKFLOW:-}" ]; then
cpanm --notest --cpanfile ci/cpanfile --installdeps .
fi
# Dependencies for additional style checks for the Python bindings. These are
# only run as part of the MIT Kerberos test.
if [ "$KERBEROS" = "mit" ]; then
pip3 install -r python/requirements-dev.txt
fi
|