| 1 |
#!/bin/bash -ex |
| 2 |
|
| 3 |
# Run with 'GSSAPI_PROVIDER=heimdal build_helpers/run-container.sh' to run tests |
| 4 |
# against Heimdal. |
| 5 |
|
| 6 |
docker run \ |
| 7 |
--rm \ |
| 8 |
--interactive \ |
| 9 |
--hostname test.krbtest.com \ |
| 10 |
--volume "$( pwd )":/tmp/build:z \ |
| 11 |
--workdir /tmp/build \ |
| 12 |
--env GSSAPI_PROVIDER=${GSSAPI_PROVIDER:-mit} \ |
| 13 |
debian:11 /bin/bash -ex -c 'source /dev/stdin' << 'EOF' |
| 14 |
|
| 15 |
source ./build_helpers/lib.sh |
| 16 |
lib::setup::system_requirements |
| 17 |
|
| 18 |
apt-get -y install \ |
| 19 |
locales \ |
| 20 |
python3 \ |
| 21 |
python3-{dev,pip,venv} |
| 22 |
ln -s /usr/bin/python3 /usr/bin/python |
| 23 |
|
| 24 |
# Ensure locale settings in test work |
| 25 |
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen |
| 26 |
dpkg-reconfigure --frontend=noninteractive locales |
| 27 |
|
| 28 |
python -m pip install build |
| 29 |
python -m build |
| 30 |
lib::setup::python_requirements |
| 31 |
|
| 32 |
# Ensure we don't pollute the local dir + mypy doesn't like this |
| 33 |
rm -rf dist |
| 34 |
rm -rf build |
| 35 |
|
| 36 |
lib::sanity::run |
| 37 |
|
| 38 |
export PYTEST_ADDOPTS="--color=yes" |
| 39 |
lib::tests::run |
| 40 |
EOF |