mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 13:55:45 +02:00
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
|
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):
|
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:
|
while attempts:
|
||||||
try:
|
try:
|
||||||
p = ExpectProcess(
|
p = ExpectProcess(
|
||||||
|
@ -69,11 +69,6 @@ def main(attempts=3):
|
|||||||
|
|
||||||
tmux_exe = os.path.join(vterm_path, 'tmux')
|
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))
|
socket_path = os.path.abspath('tmux-socket-{0}'.format(attempts))
|
||||||
if os.path.exists(socket_path):
|
if os.path.exists(socket_path):
|
||||||
os.unlink(socket_path)
|
os.unlink(socket_path)
|
||||||
@ -237,7 +232,6 @@ def main(attempts=3):
|
|||||||
return do_terminal_tests(
|
return do_terminal_tests(
|
||||||
tests=tests,
|
tests=tests,
|
||||||
cmd=tmux_exe,
|
cmd=tmux_exe,
|
||||||
lib=lib,
|
|
||||||
dim=dim,
|
dim=dim,
|
||||||
args=args,
|
args=args,
|
||||||
env=env,
|
env=env,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user