aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in5
-rw-r--r--src/util/testrealm.py10
2 files changed, 12 insertions, 3 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 7ac8320..acd27ba 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -592,8 +592,11 @@ check-unix:: krb5-config
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
diff --git a/src/util/testrealm.py b/src/util/testrealm.py
index 30b3256..53f0622 100644
--- a/src/util/testrealm.py
+++ b/src/util/testrealm.py
@@ -22,7 +22,9 @@
# 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 *
@@ -53,7 +55,11 @@ def supplement_path(env):
# 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)