Fix LD_LIBRARY_PATH order when running tests

build/lib needs to be first in case LD_LIBRARY_PATH contains another Cantera
installation.

Resolves #310.
This commit is contained in:
Ray Speth 2015-11-19 11:46:25 -05:00
parent 10981277ae
commit a7db9a7411
2 changed files with 2 additions and 9 deletions

View file

@ -30,12 +30,8 @@ localenv['ENV']['CANTERA_DATA'] = Dir('#build/data').abspath
PASSED_FILES = {}
# Needed for Intel runtime libraries when compiling with ICC
# Add build/lib in order to find Cantera shared library
if localenv['ENV'].get('LD_LIBRARY_PATH'):
localenv['ENV']['LD_LIBRARY_PATH'] += os.pathsep + Dir('#build/lib').abspath
else:
localenv['ENV']['LD_LIBRARY_PATH'] = Dir('#build/lib').abspath
localenv.PrependENVPath('LD_LIBRARY_PATH', Dir('#build/lib').abspath)
def addTestProgram(subdir, progName, env_vars={}):
"""

View file

@ -33,10 +33,7 @@ else:
localenv['ENV']['CANTERA_DATA'] = pjoin(os.getcwd(), '..', 'build', 'data')
# Add build/lib in order to find Cantera shared library
if localenv['ENV'].get('LD_LIBRARY_PATH'):
localenv['ENV']['LD_LIBRARY_PATH'] += os.pathsep + Dir('#build/lib').abspath
else:
localenv['ENV']['LD_LIBRARY_PATH'] = Dir('#build/lib').abspath
localenv.PrependENVPath('LD_LIBRARY_PATH', Dir('#build/lib').abspath)
PASSED_FILES = {}