diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py index 39469f140..51ce1d73b 100644 --- a/kitty_tests/ssh.py +++ b/kitty_tests/ssh.py @@ -78,7 +78,13 @@ print(' '.join(map(str, buf)))'''), lines=13, cols=77) self.assertFalse(os.path.exists(os.path.join(home_dir, '.terminfo/kitty.terminfo'))) pty = self.create_pty(f'{sh} -c {shlex.quote(script)}', cwd=home_dir, env=env) del script - pty.wait_till(lambda: 'UNTAR_DONE' in pty.screen_contents()) + + def check_untar_or_fail(): + q = pty.screen_contents() + if 'bzip2' in q: + raise ValueError('Untarring failed with screen contents:\n' + q) + return 'UNTAR_DONE' in q + pty.wait_till(check_untar_or_fail) self.assertTrue(os.path.exists(os.path.join(home_dir, '.terminfo/kitty.terminfo'))) if SHELL_INTEGRATION_VALUE != 'enabled': pty.wait_till(lambda: len(pty.screen_contents().splitlines()) > 1)