File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,9 @@ def _io_thread(self):
63
63
err_wait = select .poll ()
64
64
err_wait .register (self .process .stderr , select .POLLIN | select .POLLHUP )
65
65
66
- with open (self .output_path , "wt" ) as f :
66
+ with open (self .output_path , "wt" , buffering = 1 ) as f :
67
67
f .write ("PROCESS START: %s\n " % time .ctime ())
68
+ f .flush ()
68
69
while not self .done :
69
70
changes = out_wait .poll (0.1 )
70
71
if changes :
@@ -73,6 +74,7 @@ def _io_thread(self):
73
74
# stdout closed (otherwise readline should have at least \n)
74
75
continue
75
76
f .write (out_line )
77
+ f .flush ()
76
78
self .output_lines .put (out_line )
77
79
78
80
changes = err_wait .poll (0 )
@@ -82,7 +84,9 @@ def _io_thread(self):
82
84
# stderr closed (otherwise readline should have at least \n)
83
85
continue
84
86
f .write (f"!!STDERR!! : { err_line } " )
87
+ f .flush ()
85
88
f .write ("PROCESS END: %s\n " % time .ctime ())
89
+ f .flush ()
86
90
87
91
def __enter__ (self ):
88
92
self .done = False
@@ -92,6 +96,7 @@ def __enter__(self):
92
96
stdout = subprocess .PIPE ,
93
97
stderr = subprocess .PIPE ,
94
98
text = True ,
99
+ bufsize = 1
95
100
)
96
101
self .io_thread = threading .Thread (target = self ._io_thread )
97
102
self .io_thread .start ()
Original file line number Diff line number Diff line change @@ -205,6 +205,8 @@ def send_input_cmd_to_subprocess(
205
205
f"{ test_sequence_name } - Sent `{ input_cmd } ` to the { app_name } subprocess."
206
206
)
207
207
208
+ time .sleep (0.5 )
209
+
208
210
209
211
def handle_input_cmd (
210
212
processes : RunningProcesses , test_sequence_name : str , test_sequence_step : Step
You can’t perform that action at this time.
0 commit comments