From 048c45e81be65f31cd698de6b3536e35f7f1599a Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 16 Apr 2010 21:45:22 +0000 Subject: 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 --- src/util/k5test.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/util/k5test.py') 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 -- cgit