From: Tom Yu Date: Mon, 15 Mar 2010 18:53:02 +0000 (+0000) Subject: Set up KRB5_RUN_ENV for pytests, so that Python-based tests can run X-Git-Tag: krb5-1.9-beta1~312 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6bd96a6b3ee57d131da4c4f379fa9c1c388592b3;p=krb5.git 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 --- 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.