Skip to content

Commit 0ced609

Browse files
committed
Send SIGINT in case of timeout of tagged unittest
1 parent bfa60a2 commit 0ced609

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def run_with_timeout(cmd, *, timeout, **kwargs):
229229
print("Cannot find the 'timeout' GNU tool. Do you have coreutils installed?")
230230
else:
231231
timeout_cmd = p[1].strip()
232-
cmd = [timeout_cmd, "-k", "10", str(timeout)] + cmd
232+
# signal nr. 2 is SIGINT; this has better chances to print a Python traceback
233+
cmd = [timeout_cmd, "-s", "2", "-k", "10", str(timeout)] + cmd
233234
return subprocess.run(cmd, **kwargs)
234235

235236

0 commit comments

Comments
 (0)