-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kitty: refactor add patch to solve darwin test errors
- Loading branch information
Showing
2 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
pkgs/by-name/ki/kitty/0001-Make-deleting-test-dir-suring-shell-integration-test.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 8cbdd003e2aba44d7c149ccd4c648504619f9323 Mon Sep 17 00:00:00 2001 | ||
From: Kovid Goyal <kovid@kovidgoyal.net> | ||
Date: Sat, 8 Mar 2025 10:41:11 +0530 | ||
Subject: [PATCH] Make deleting test dir suring shell integration tests robust | ||
against fish 4 background daemon generating completions | ||
|
||
--- | ||
kitty_tests/shell_integration.py | 12 ++++++++++-- | ||
1 file changed, 10 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/kitty_tests/shell_integration.py b/kitty_tests/shell_integration.py | ||
index 61b4b0a7b..6c97f40d5 100644 | ||
--- a/kitty_tests/shell_integration.py | ||
+++ b/kitty_tests/shell_integration.py | ||
@@ -2,6 +2,7 @@ | ||
# License: GPLv3 Copyright: 2022, Kovid Goyal <kovid at kovidgoyal.net> | ||
|
||
|
||
+import errno | ||
import os | ||
import shlex | ||
import shutil | ||
@@ -101,8 +102,15 @@ def run_shell(self, shell='zsh', rc='', cmd='', setup_env=None): | ||
i -= 1 | ||
yield pty | ||
finally: | ||
- if os.path.exists(home_dir): | ||
- shutil.rmtree(home_dir) | ||
+ while os.path.exists(home_dir): | ||
+ try: | ||
+ shutil.rmtree(home_dir) | ||
+ except OSError as e: | ||
+ # As of fish 4 fish runs a background daemon generating | ||
+ # completions. | ||
+ if e.errno == errno.ENOTEMPTY: | ||
+ continue | ||
+ raise | ||
|
||
@unittest.skipUnless(shutil.which('zsh'), 'zsh not installed') | ||
def test_zsh_integration(self): | ||
-- | ||
2.48.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters