mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 01:00:18 +02:00
Tests: skip the SIGINT launcher case on bash 3.2 (macOS's), which doesn't run the trap during wait
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5aea46afd0
commit
448720d8d6
1 file changed
+5
-1
@@ -98,7 +98,11 @@ class LauncherTests(unittest.TestCase):
|
||||
self.exercise(True)
|
||||
|
||||
def test_hangup_and_interrupt_cleanup(self):
|
||||
for sig in (signal.SIGHUP, signal.SIGINT):
|
||||
# macOS's stock bash 3.2 doesn't run a SIGINT trap while blocked in `wait`;
|
||||
# the Frame's bash (5.x) does, and that's where the launcher runs.
|
||||
major = subprocess.run(['bash', '-c', 'echo ${BASH_VERSINFO[0]}'], capture_output=True, text=True).stdout.strip()
|
||||
sigs = (signal.SIGHUP, signal.SIGINT) if major.isdigit() and int(major) >= 4 else (signal.SIGHUP,)
|
||||
for sig in sigs:
|
||||
with self.subTest(sig=sig):
|
||||
self.exercise(True, sig)
|
||||
|
||||
|
||||
Reference in new issue
Block a user