From a7db9a7411144099cd119fa5705b0f999582de36 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 19 Nov 2015 11:46:25 -0500 Subject: [PATCH] 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. --- test/SConscript | 6 +----- test_problems/SConscript | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/test/SConscript b/test/SConscript index e7ee1c8a3..9543a3215 100644 --- a/test/SConscript +++ b/test/SConscript @@ -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={}): """ diff --git a/test_problems/SConscript b/test_problems/SConscript index 35ea7e9a6..aad5635ca 100644 --- a/test_problems/SConscript +++ b/test_problems/SConscript @@ -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 = {}