[28358] in CVS-changelog-for-Kerberos-V5
krb5 commit: Have k5test.py provide 'runenv' to python tests
daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Jun 2 18:53:56 2014
Date: Mon, 2 Jun 2014 18:53:35 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201406022253.s52MrZtJ023752@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/f78f8b1a46534db3a4547323ba952c1fa1b41fe9
commit f78f8b1a46534db3a4547323ba952c1fa1b41fe9
Author: Nalin Dahyabhai <nalin@dahyabhai.net>
Date: Fri May 30 17:13:31 2014 -0400
Have k5test.py provide 'runenv' to python tests
Expose the formerly-internal _runenv module as k5test.runenv, so that
settings we store in the top-level runenv.py will be available to them.
ticket: 7929
src/util/k5test.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/util/k5test.py b/src/util/k5test.py
index a2bfbee..8cb477d 100644
--- a/src/util/k5test.py
+++ b/src/util/k5test.py
@@ -177,6 +177,12 @@ Scripts may use the following functions and variables:
* args: Positional arguments left over after flags are processed.
+* runenv: The contents of $srctop/runenv.py, containing a dictionary
+ 'env' which specifies additional variables to be added to the realm
+ environment, and a variable 'proxy_tls_impl', which indicates which
+ SSL implementation (if any) is being used by libkrb5's support for
+ contacting KDCs and kpasswd servers over HTTPS.
+
* verbose: Whether the script is running verbosely.
* testpass: The command-line test pass argument. The script does not
@@ -526,9 +532,9 @@ def _match_cmdnum(cmdnum, ind):
# Return an environment suitable for running programs in the build
# tree. It is safe to modify the result.
def _build_env():
- global buildtop, _runenv
+ global buildtop, runenv
env = os.environ.copy()
- for (k, v) in _runenv.iteritems():
+ for (k, v) in runenv.env.iteritems():
if v.find('./') == 0:
env[k] = os.path.join(buildtop, v)
else:
@@ -544,8 +550,7 @@ def _import_runenv():
runenv_py = os.path.join(buildtop, 'runenv.py')
if not os.path.exists(runenv_py):
fail('You must run "make runenv.py" in %s first.' % buildtop)
- module = imp.load_source('runenv', runenv_py)
- return module.env
+ return imp.load_source('runenv', runenv_py)
# Merge the nested dictionaries cfg1 and cfg2 into a new dictionary.
@@ -1174,7 +1179,7 @@ _cmd_index = 1
buildtop = _find_buildtop()
srctop = _find_srctop()
plugins = os.path.join(buildtop, 'plugins')
-_runenv = _import_runenv()
+runenv = _import_runenv()
hostname = _get_hostname()
null_input = open(os.devnull, 'r')
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5