svn rev #23913: trunk/src/ config/ util/
tlyu@MIT.EDU
tlyu at MIT.EDU
Tue Apr 20 18:35:42 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=23913
Commit By: tlyu
Log Message:
Only create runenv.py at BUILDTOP. Fix bugs in k5test.py relating to
environment initialization, also so that "make testrealm" works again.
Changed Files:
U trunk/src/Makefile.in
U trunk/src/config/post.in
U trunk/src/util/k5test.py
Modified: trunk/src/Makefile.in
===================================================================
--- trunk/src/Makefile.in 2010-04-20 21:12:10 UTC (rev 23912)
+++ trunk/src/Makefile.in 2010-04-20 22:35:42 UTC (rev 23913)
@@ -14,8 +14,10 @@
plugins/preauth/encrypted_challenge \
kdc kadmin slave clients appl tests \
config-files gen-manpages
-BUILDTOP=$(REL)$(C)
+BUILDTOP=$(REL).
LOCALINCLUDES = -I$(srcdir)
+PROG_LIBPATH=-L$(TOPLIBD)
+PROG_RPATH=$(KRB5_LIBDIR)
SRCS =
HDRS =
@@ -625,9 +627,26 @@
check-prerecurse: fake-install
# Create a test realm and spawn a shell in an environment pointing to it.
-testrealm: fake-install
- PYTHONPATH=$(top_srcdir)/util $(PYTHON) $(srcdir)/util/testrealm.py
+testrealm: fake-install runenv.py
+ PYTHONPATH=$(BUILDTOP):$(top_srcdir)/util $(PYTHON) $(srcdir)/util/testrealm.py
+# environment variable settings to propagate to Python-based tests
+
+check-pytests-yes: runenv.py
+
+pyrunenv.vals: Makefile
+ $(KRB5_RUN_ENV) \
+ for i in $(KRB5_RUN_VARS); do \
+ eval echo 'env['\\\'$$i\\\''] = '\\\'\$$$$i\\\'; \
+ done > $@
+
+runenv.py: pyrunenv.vals
+ echo 'env = {}' > $@
+ cat pyrunenv.vals >> $@
+
+clean-unix::
+ $(RM) runenv.py pyrunenv.vals
+
COV_BUILD= cov-build
COV_ANALYZE= cov-analyze
COV_COMMIT= cov-commit-defects --product "$(COV_PRODUCT)" --user "$(COV_USER)" --target "$(COV_TARGET)" --description "$(COV_DESC)"
Modified: trunk/src/config/post.in
===================================================================
--- trunk/src/config/post.in 2010-04-20 21:12:10 UTC (rev 23912)
+++ trunk/src/config/post.in 2010-04-20 22:35:42 UTC (rev 23913)
@@ -136,10 +136,10 @@
check-pytests:: check-pytests- at HAVE_PYTHON@
-check-pytests-yes: runenv.py
+check-pytests-yes:
@pytests="$(PYTESTS)"; \
for t in $$pytests; do \
- echo PYTHONPATH=`pwd`:$(top_srcdir)/util VALGRIND="$(VALGRIND)" \
+ echo PYTHONPATH=$(BUILDTOP):$(top_srcdir)/util VALGRIND="$(VALGRIND)" \
$(PYTHON) $(srcdir)/$$t $(PYTESTFLAGS); \
PYTHONPATH=`pwd`:$(top_srcdir)/util VALGRIND="$(VALGRIND)" \
$(PYTHON) $(srcdir)/$$t $(PYTESTFLAGS) || exit 1; \
@@ -150,22 +150,11 @@
echo "+++ Skipping because Python not available: $(PYTESTS)"; \
fi
-pyrunenv.vals: Makefile
- $(KRB5_RUN_ENV) \
- for i in $(KRB5_RUN_VARS); do \
- eval echo 'env['\\\'$$i\\\''] = '\\\'\$$$$i\\\'; \
- done > $@
-
-runenv.py: pyrunenv.vals
- echo 'env = {}' > $@
- cat pyrunenv.vals >> $@
-
clean:: clean-$(WHAT)
clean-unix::
$(RM) $(OBJS) $(DEPTARGETS_CLEAN) $(EXTRA_FILES) et-[ch]-*.et et-[ch]-*.[ch]
-$(RM) -r $(top_srcdir)/autom4te.cache
- $(RM) runenv.py pyrunenv.vals
clean-windows::
$(RM) *.$(OBJEXT)
Modified: trunk/src/util/k5test.py
===================================================================
--- trunk/src/util/k5test.py 2010-04-20 21:12:10 UTC (rev 23912)
+++ trunk/src/util/k5test.py 2010-04-20 22:35:42 UTC (rev 23913)
@@ -467,7 +467,14 @@
# Return an environment suitable for running programs in the build
# tree. It is safe to modify the result.
def _build_env():
- return dict(runenv.env)
+ global buildtop
+ env = os.environ.copy()
+ for (k, v) in runenv.env.iteritems():
+ if v.find('./') == 0:
+ env[k] = os.path.join(buildtop, v)
+ else:
+ env[k] = v
+ return env
# Merge the nested dictionaries cfg1 and cfg2 into a new dictionary.
# cfg1 or cfg2 may be None, in which case the other is returned. If
More information about the cvs-krb5
mailing list