From 6bd96a6b3ee57d131da4c4f379fa9c1c388592b3 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Mon, 15 Mar 2010 18:53:02 +0000 Subject: [PATCH] Set up KRB5_RUN_ENV for pytests, so that Python-based tests can run without first running "make install". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23805 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/post.in | 4 +++- src/config/pre.in | 3 +++ src/tests/t_anonpkinit.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/config/post.in b/src/config/post.in index 47ef248f8..f9fae21cb 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -139,8 +139,10 @@ check-pytests:: check-pytests-@HAVE_PYTHON@ check-pytests-yes: @pytests="$(PYTESTS)"; \ for t in $$pytests; do \ - echo PYTHONPATH=$(top_srcdir)/util VALGRIND="$(VALGRIND)" \ + echo "$(KRB5_RUN_ENV)" \ + PYTHONPATH=$(top_srcdir)/util VALGRIND="$(VALGRIND)" \ $(PYTHON) $(srcdir)/$$t $(PYTESTFLAGS); \ + $(KRB5_RUN_ENV) \ PYTHONPATH=$(top_srcdir)/util VALGRIND="$(VALGRIND)" \ $(PYTHON) $(srcdir)/$$t $(PYTESTFLAGS) || exit 1; \ done diff --git a/src/config/pre.in b/src/config/pre.in index d2fc921e8..6bf9cc438 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -396,6 +396,9 @@ UTIL_LIB = @UTIL_LIB@ # eventually) but which we don't want to install. APPUTILS_LIB = -lapputils +# So test programs can find their libraries without "make install", etc. +KRB5_RUN_ENV=@KRB5_RUN_ENV@ + # # variables for --with-tcl= TCL_LIBS = @TCL_LIBS@ diff --git a/src/tests/t_anonpkinit.py b/src/tests/t_anonpkinit.py index e75cf38e1..0149a671b 100644 --- a/src/tests/t_anonpkinit.py +++ b/src/tests/t_anonpkinit.py @@ -3,7 +3,7 @@ from k5test import * # Skip this test if pkinit wasn't built. if not os.path.exists(os.path.join(plugins, 'preauth', 'pkinit.so')): - success() + success('Warning: not testing pkinit because it is not built.') exit(0) # Construct a krb5.conf fragment configuring pkinit. -- 2.26.2