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 =
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
check-pytests:: check-pytests-@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; \
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)
# 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