@@ -193,13 +193,15 @@ def bisect_command
193193 puts reopen_previous_step
194194 puts red ( "The failing test does not exist." )
195195 File . write ( 'log/test_order.log' , "" )
196+ File . write ( 'log/bisect_test_details.log' , "" )
196197 exit! 1
197198 end
198199
199200 unless run_tests_in_fork ( queue . failing_test )
200201 puts reopen_previous_step
201202 puts red ( "The test fail when ran alone, no need to bisect." )
202203 File . write ( 'log/test_order.log' , queue_config . failing_test )
204+ File . write ( 'log/bisect_test_details.log' , "" )
203205 exit! 0
204206 end
205207
@@ -218,6 +220,7 @@ def bisect_command
218220 if queue . suspects_left == 0
219221 step ( yellow ( "The failing test was the first test in the test order so there is nothing to bisect." ) )
220222 File . write ( 'log/test_order.log' , "" )
223+ File . write ( 'log/bisect_test_details.log' , "" )
221224 exit! 1
222225 end
223226
@@ -226,6 +229,7 @@ def bisect_command
226229 if run_tests_in_fork ( failing_order )
227230 step ( yellow ( "The bisection was inconclusive, there might not be any leaky test here." ) )
228231 File . write ( 'log/test_order.log' , "" )
232+ File . write ( 'log/bisect_test_details.log' , "" )
229233 exit! 1
230234 else
231235 step ( green ( 'The following command should reproduce the leak on your machine:' ) , collapsed : false )
@@ -238,6 +242,16 @@ def bisect_command
238242 puts
239243
240244 File . write ( 'log/test_order.log' , failing_order . to_a . map ( &:id ) . join ( "\n " ) )
245+
246+ bisect_test_details = failing_order . to_a . map do |test |
247+ source_location = test . source_location
248+ file_path = source_location &.first || 'unknown'
249+ line_number = source_location &.last || -1
250+ "#{ test . id } #{ file_path } :#{ line_number } "
251+ end
252+
253+ File . write ( 'log/bisect_test_details.log' , bisect_test_details . join ( "\n " ) )
254+
241255 exit! 0
242256 end
243257 end
0 commit comments