Set up KRB5_RUN_ENV for pytests, so that Python-based tests can run
authorTom Yu <tlyu@mit.edu>
Mon, 15 Mar 2010 18:53:02 +0000 (18:53 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 15 Mar 2010 18:53:02 +0000 (18:53 +0000)
without first running "make install".

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23805 dc483132-0cff-0310-8789-dd5450dbe970

src/config/post.in
src/config/pre.in
src/tests/t_anonpkinit.py

index 47ef248f8a8a6569eec8270a2f362c773b1e4861..f9fae21cb8a25ad401aaf4df9146ff01dd18a85d 100644 (file)
@@ -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
index d2fc921e89b10c6b3863ddcc34fcfecb90a56759..6bf9cc438ee105e9d67710e29d9aaba5106bda04 100644 (file)
@@ -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@
index e75cf38e12d96118968e45a2bcd15d8edb5fbc82..0149a671b1924bb2175d01554b6d6fe6eff7c993 100644 (file)
@@ -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.