Allow "make testrealm CROSSNUM=N" to make N fully-connected realms for
cross-realm testing convenience.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25435
dc483132-0cff-0310-8789-
dd5450dbe970
check-prerecurse: fake-install
# Create a test realm and spawn a shell in an environment pointing to it.
+# If CROSSNUM is set, create that many fully connected test realms and
+# point the shell at the first one.
testrealm: fake-install
- PYTHONPATH=$(BUILDTOP):$(top_srcdir)/util $(PYTHON) $(srcdir)/util/testrealm.py
+ PYTHONPATH=$(top_srcdir)/util $(PYTHON) $(srcdir)/util/testrealm.py \
+ $(CROSSNUM)
# environment variable settings to propagate to Python-based tests
# Invoked by the testrealm target in the top-level Makefile. Creates
# a test realm and spawns a shell pointing at it, for convenience of
-# manual testing.
+# manual testing. If a numeric argument is present after options,
+# creates that many fully connected test realms and point the shell at
+# the first one.
from k5test import *
# Assume PATH exists in env for simplicity.
env['PATH'] = path_prefix + env['PATH']
-realm = K5Realm()
+if args:
+ realms = cross_realms(int(args[0]))
+ realm = realms[0]
+else:
+ realm = K5Realm()
env = realm.env_master.copy()
supplement_path(env)