@@ -110,21 +110,43 @@ def main():
110110 main_start = time .time ()
111111
112112 if is_github_actions :
113- # In CI, capture output to keep logs clean
113+ # In CI, capture output but show detailed failures
114114 main_result = subprocess .run (cmd , capture_output = True , text = True )
115115 main_passed = main_result .returncode == 0
116116 main_time = time .time () - main_start
117117
118118 print (f"Main test suite: { 'PASSED' if main_passed else 'FAILED' } ({ main_time :.1f} s)" )
119119
120120 if not main_passed :
121- # Show failures in CI
121+ # Show detailed failures in CI
122+ print ("\n " + "=" * 80 )
123+ print ("DETAILED FAILURE OUTPUT:" )
124+ print ("=" * 80 )
125+
126+ # Show both stdout and stderr
127+ if main_result .stdout :
128+ print ("STDOUT:" )
129+ print (main_result .stdout )
130+ print ("-" * 80 )
131+
132+ if main_result .stderr :
133+ print ("STDERR:" )
134+ print (main_result .stderr )
135+ print ("-" * 80 )
136+
137+ # Also show summary of failed tests
122138 lines = main_result .stdout .split ('\n ' )
123- failed_lines = [line for line in lines if 'FAILED' in line ][:5 ]
124- if failed_lines :
125- print ("Recent failures:" )
126- for line in failed_lines :
127- print (f" { line } " )
139+ failed_lines = [line for line in lines if 'FAILED' in line ]
140+ error_lines = [line for line in lines if 'ERROR' in line ]
141+
142+ if failed_lines or error_lines :
143+ print ("\n FAILURE SUMMARY:" )
144+ for line in failed_lines [:10 ]: # Show more failures
145+ print (f" FAILED: { line } " )
146+ for line in error_lines [:5 ]:
147+ print (f" ERROR: { line } " )
148+
149+ print ("=" * 80 )
128150 else :
129151 # Locally, show real-time progress
130152 main_result = subprocess .run (cmd )
@@ -158,7 +180,7 @@ def main():
158180 iso_start = time .time ()
159181
160182 if is_github_actions :
161- # In CI, capture output
183+ # In CI, capture output but show detailed failures
162184 result = subprocess .run (cmd , capture_output = True , text = True )
163185 passed = result .returncode == 0
164186 iso_time = time .time () - iso_start
@@ -167,12 +189,37 @@ def main():
167189 print (f"Isolated { file_name } : { 'PASSED' if passed else 'FAILED' } ({ iso_time :.1f} s)" )
168190
169191 if not passed :
192+ print (f"\n DETAILED OUTPUT for { file_name } :" )
193+ print ("-" * 60 )
194+
195+ # Show stdout
196+ if result .stdout :
197+ print ("STDOUT:" )
198+ # Show last 50 lines to capture the actual error
199+ stdout_lines = result .stdout .split ('\n ' )
200+ for line in stdout_lines [- 50 :]:
201+ if line .strip ():
202+ print (f" { line } " )
203+ print ("-" * 40 )
204+
205+ # Show stderr
206+ if result .stderr :
207+ print ("STDERR:" )
208+ stderr_lines = result .stderr .split ('\n ' )
209+ for line in stderr_lines [- 20 :]:
210+ if line .strip ():
211+ print (f" { line } " )
212+ print ("-" * 40 )
213+
214+ # Extract specific failure info
170215 lines = result .stdout .split ('\n ' )
171- failed_lines = [line for line in lines if 'FAILED' in line ][: 3 ]
216+ failed_lines = [line for line in lines if 'FAILED' in line or 'ERROR' in line ]
172217 if failed_lines :
173- print ("Failures :" )
174- for line in failed_lines :
218+ print ("FAILURE SUMMARY :" )
219+ for line in failed_lines [: 5 ] :
175220 print (f" { line } " )
221+
222+ print ("-" * 60 )
176223 else :
177224 # Locally, show real-time progress
178225 result = subprocess .run (cmd )
0 commit comments