Bug 929125 - Set shared library path in jit-test harness; r=terrence

This commit is contained in:
Dan Minor 2013-10-22 13:57:54 -04:00
Родитель 1adfb86364
Коммит 6b6a3060a5
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -300,6 +300,21 @@ def run_test(test, prefix, options):
if test.tz_pacific:
env['TZ'] = 'PST8PDT'
# Ensure interpreter directory is in shared library path.
pathvar = ''
if sys.platform.startswith('linux'):
pathvar = 'LD_LIBRARY_PATH'
elif sys.platform.startswith('darwin'):
pathvar = 'DYLD_LIBRARY_PATH'
elif sys.platform.startswith('win'):
pathvar = 'PATH'
if pathvar:
bin_dir = os.path.dirname(cmd[0])
if pathvar in env:
env[pathvar] = '%s%s%s' % (bin_dir, os.pathsep, env[pathvar])
else:
env[pathvar] = bin_dir
out, err, code, timed_out = run(cmd, env, options.timeout)
return TestOutput(test, cmd, out, err, code, None, timed_out)