Move lib variable to do_terminal_tests
This commit is contained in:
parent
255ff49def
commit
cac99271ca
|
@ -219,8 +219,15 @@ def get_env(vterm_path, test_dir, *args, **kwargs):
|
|||
return env
|
||||
|
||||
|
||||
def do_terminal_tests(tests, cmd, lib, dim, args, env, cwd=None, fin_cb=None,
|
||||
def do_terminal_tests(tests, cmd, dim, args, env, cwd=None, fin_cb=None,
|
||||
last_attempt_cb=None, attempts=3):
|
||||
lib = os.environ.get('POWERLINE_LIBVTERM')
|
||||
if not lib:
|
||||
if os.path.exists('tests/bot-ci/deps/libvterm/libvterm.so'):
|
||||
lib = 'tests/bot-ci/deps/libvterm/libvterm.so'
|
||||
else:
|
||||
lib = 'libvterm.so'
|
||||
|
||||
while attempts:
|
||||
try:
|
||||
p = ExpectProcess(
|
||||
|
|
|
@ -69,11 +69,6 @@ def main(attempts=3):
|
|||
|
||||
tmux_exe = os.path.join(vterm_path, 'tmux')
|
||||
|
||||
if os.path.exists('tests/bot-ci/deps/libvterm/libvterm.so'):
|
||||
lib = 'tests/bot-ci/deps/libvterm/libvterm.so'
|
||||
else:
|
||||
lib = os.environ.get('POWERLINE_LIBVTERM', 'libvterm.so')
|
||||
|
||||
socket_path = os.path.abspath('tmux-socket-{0}'.format(attempts))
|
||||
if os.path.exists(socket_path):
|
||||
os.unlink(socket_path)
|
||||
|
@ -237,7 +232,6 @@ def main(attempts=3):
|
|||
return do_terminal_tests(
|
||||
tests=tests,
|
||||
cmd=tmux_exe,
|
||||
lib=lib,
|
||||
dim=dim,
|
||||
args=args,
|
||||
env=env,
|
||||
|
|
Loading…
Reference in New Issue