Use tmux executable from fake PATH for running tmux

Otherwise with system tmux present it may appear that subprocess.check_call will
use it instead.
This commit is contained in:
ZyX 2015-01-16 21:45:48 +03:00
parent d9ed3a3117
commit 9db1e7b76e

View File

@ -32,12 +32,14 @@ def main():
rows = 50 rows = 50
cols = 200 cols = 200
tmux_exe = os.path.join(vterm_path, 'tmux')
try: try:
p = ExpectProcess( p = ExpectProcess(
lib='tests/bot-ci/deps/libvterm/libvterm.so', lib='tests/bot-ci/deps/libvterm/libvterm.so',
rows=rows, rows=rows,
cols=cols, cols=cols,
cmd='tmux', cmd=tmux_exe,
args=[ args=[
# Specify full path to tmux socket (testing tmux instance must # Specify full path to tmux socket (testing tmux instance must
# not interfere with user one) # not interfere with user one)
@ -135,7 +137,7 @@ def main():
print(''.join((u(line) for line in ndiff([a], [b])))) print(''.join((u(line) for line in ndiff([a], [b]))))
return False return False
finally: finally:
check_call(['tmux', '-S', socket_path, 'kill-server'], env={ check_call([tmux_exe, '-S', socket_path, 'kill-server'], env={
'PATH': vterm_path, 'PATH': vterm_path,
}) })