diff options
author | Tom Yu <tlyu@mit.edu> | 2010-04-16 21:45:22 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2010-04-16 21:45:22 +0000 |
commit | 048c45e81be65f31cd698de6b3536e35f7f1599a (patch) | |
tree | dda52574fac9042667db70a9fba41a04d4f8d718 /src/util/k5test.py | |
parent | 4472eed040cf442a504f24158f80242d6fbd94c2 (diff) | |
download | krb5-048c45e81be65f31cd698de6b3536e35f7f1599a.tar.gz krb5-048c45e81be65f31cd698de6b3536e35f7f1599a.tar.xz krb5-048c45e81be65f31cd698de6b3536e35f7f1599a.zip |
Build runenv.py, holding environment variable settings required for
running programs out of the build tree during python-based tests.
Also updates shilb.conf to set RUN_VARS to make it easier to generate
this sort of thing.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23905 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/k5test.py')
-rw-r--r-- | src/util/k5test.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/util/k5test.py b/src/util/k5test.py index 2404a46a1f..1065191e2f 100644 --- a/src/util/k5test.py +++ b/src/util/k5test.py @@ -304,6 +304,11 @@ import string import subprocess import sys +# runenv.py is built in each directory where tests are run, providing +# the environment variable settings needed for running programs in the +# build tree. These can vary by platform. +import runenv + # Used when most things go wrong (other than programming errors) so # that the user sees an error message rather than a Python traceback, # without help from the test script. The on-exit handler will display @@ -462,16 +467,7 @@ 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(): - libdir = os.path.join(buildtop, 'lib') - env = os.environ.copy() - ldlpath = env.get('LD_LIBRARY_PATH') - if ldlpath: - ldlpath = libdir + os.pathsep + ldlpath - else: - ldlpath = libdir - env['LD_LIBRARY_PATH'] = ldlpath - return env - + return dict(runenv.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 |