File tree 2 files changed +12
-5
lines changed
graalpython/com.oracle.graal.python.test/src
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -701,7 +701,7 @@ def run_in_subprocess_and_watch(self):
701
701
popen_kwargs .update (pass_fds = [child_pipe .fileno ()])
702
702
self .process = subprocess .Popen (cmd , ** popen_kwargs )
703
703
704
- timed_out = False
704
+ timed_out = None
705
705
706
706
if use_pipe :
707
707
while self .process .poll () is None :
@@ -718,7 +718,7 @@ def run_in_subprocess_and_watch(self):
718
718
719
719
if time .time () - self .last_started_time >= timeout :
720
720
interrupt_process (self .process )
721
- timed_out = True
721
+ timed_out = timeout
722
722
# Drain the pipe
723
723
while pipe .poll (0.1 ):
724
724
pipe .recv ()
@@ -741,11 +741,11 @@ def run_in_subprocess_and_watch(self):
741
741
for file_event in pickle .load (f ):
742
742
self .process_event (file_event )
743
743
744
- if returncode != 0 or timed_out :
744
+ if returncode != 0 or timed_out is not None :
745
745
self .out_file .seek (self .last_out_pos )
746
746
output = self .out_file .read ()
747
- if timed_out :
748
- message = "Timed out"
747
+ if timed_out is not None :
748
+ message = f "Timed out in { timed_out } s "
749
749
elif returncode >= 0 :
750
750
message = f"Test process exitted with code { returncode } "
751
751
else :
Original file line number Diff line number Diff line change @@ -64,3 +64,10 @@ selector = [
64
64
# These test would work on JVM too, but they are prohibitively slow due to a large amount of subprocesses
65
65
" test_patched_pip.py" ,
66
66
]
67
+
68
+ [[test_rules ]]
69
+ per_test_timeout = 1200
70
+ selector = [
71
+ " test_venv.py" ,
72
+ " test_patched_pip.py" ,
73
+ ]
You can’t perform that action at this time.
0 commit comments