Skip to content

Commit 3d1244b

Browse files
committed
Support for running tests against Heimdal in CI
Signed-off-by: Jordan Borean <jborean93@gmail.com>
1 parent be33336 commit 3d1244b

File tree

5 files changed

+296
-84
lines changed

5 files changed

+296
-84
lines changed

Diff for: ci/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ if [ $BUILD_RES -ne 0 ]; then
3636
fi
3737

3838
# Only call exit on failures so we can source this script
39-
if [ x"$KRB5_VER" = "xheimdal" ] || [ "$OS_NAME" = "windows" ]; then
40-
# heimdal/Windows can't run the tests yet, so just make sure it imports and exit
39+
if [ "$OS_NAME" = "windows" ]; then
40+
# Windows can't run the tests yet, so just make sure it imports and exit
4141
python -c "import gssapi" || exit $?
4242
else
4343
python setup.py nosetests --verbosity=3 || exit $?

Diff for: ci/lib-setup.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ setup::debian::install() {
88
apt-get update
99

1010
if [ x"$KRB5_VER" = "xheimdal" ]; then
11-
apt-get -y install heimdal-dev
11+
apt-get -y install heimdal-{clients,dev,kdc}
12+
13+
export GSSAPI_KRB5_MAIN_LIB="/usr/lib/x86_64-linux-gnu/libkrb5.so.26"
14+
export PATH="/usr/lib/heimdal-servers:${PATH}"
1215
else
1316
apt-get -y install krb5-{user,kdc,admin-server,multidev} libkrb5-dev \
1417
gss-ntlmssp
@@ -62,6 +65,13 @@ setup::macos::install() {
6265
python3 -m virtualenv -p $(which python3) .venv
6366
source .venv/bin/activate
6467
pip install --install-option='--no-cython-compile' cython
68+
69+
export GSSAPI_KRB5_MAIN_LIB="/System/Library/PrivateFrameworks/Heimdal.framework/Heimdal"
70+
71+
# macOS's Heimdal version is buggy, it will only use KRB5_KTNAME if the
72+
# env var was set when GSSAPI creates the context. Setting it here to any
73+
# value solves that problem for CI.
74+
export KRB5_KTNAME=initial
6575
}
6676

6777
setup::windows::install() {

Diff for: ci/run-on-linux.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# If we try to use a normal Github Actions container with
44
# github-pages-deploy-action, it will fail due to inability to find git.
55

6-
docker run -h test.box \
6+
docker run -h test.krbtest.com \
77
-v `pwd`:/tmp/build -w /tmp/build \
88
-e KRB5_VER=${KRB5_VER:-mit} \
99
-e FLAKE=${FLAKE:no} \

0 commit comments

Comments
 (0)