@@ -48,7 +48,7 @@ pub const all_processes = get_all_processes()
48
48
49
49
pub const header_bytes_to_search_for_module_main = 500
50
50
51
- pub const separator = '-' .repeat (max_header_len)
51
+ pub const separator = '-' .repeat (max_header_len) + ' \n '
52
52
53
53
pub const max_compilation_retries = get_max_compilation_retries ()
54
54
@@ -531,6 +531,7 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
531
531
} else {
532
532
fname_without_extension
533
533
}
534
+ reproduce_options := cmd_options.clone ()
534
535
generated_binary_fpath := os.join_path_single (test_folder_path, generated_binary_fname)
535
536
if produces_file_output {
536
537
if ts.rm_binaries {
@@ -548,6 +549,7 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
548
549
if ts.show_stats {
549
550
skip_running = ''
550
551
}
552
+ reproduce_cmd := '${os.quoted_path(ts.vexe)} ${reproduce_options.join(' ')} ${os.quoted_path(file)} '
551
553
cmd := '${os.quoted_path(ts.vexe)} ${skip_running} ${cmd_options.join(' ')} ${os.quoted_path(file)} '
552
554
run_cmd := if run_js {
553
555
'node ${os.quoted_path(generated_binary_fpath)} '
@@ -620,7 +622,7 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
620
622
}
621
623
ts.benchmark.fail ()
622
624
tls_bench.fail ()
623
- ts.add_failed_cmd (cmd )
625
+ ts.add_failed_cmd (reproduce_cmd )
624
626
return pool.no_result
625
627
}
626
628
} else {
@@ -650,7 +652,7 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
650
652
cmd_duration,
651
653
preparation: compile_cmd_duration
652
654
), cmd_duration, mtc)
653
- ts.add_failed_cmd (cmd )
655
+ ts.add_failed_cmd (reproduce_cmd )
654
656
return pool.no_result
655
657
}
656
658
tls_bench.step_restart ()
@@ -678,8 +680,10 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
678
680
// retry running at least 1 more time, to avoid CI false positives as much as possible
679
681
details.retry++
680
682
}
681
- failure_output.write_string (separator)
682
- failure_output.writeln ('\n retry: 0 ; max_retry: ${details.retry} ; r.exit_code: ${r.exit_code} ; trimmed_output.len: ${trimmed_output.len} ' )
683
+ if details.retry != 0 {
684
+ failure_output.write_string (separator)
685
+ failure_output.writeln (' retry: 0 ; max_retry: ${details.retry} ; r.exit_code: ${r.exit_code} ; trimmed_output.len: ${trimmed_output.len} ' )
686
+ }
683
687
failure_output.writeln (trimmed_output)
684
688
os.setenv ('VTEST_RETRY_MAX' , '${details.retry} ' , true )
685
689
for retry = 1 ; retry < = details.retry; retry++ {
@@ -702,7 +706,7 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
702
706
}
703
707
trimmed_output = r.output.trim_space ()
704
708
failure_output.write_string (separator)
705
- failure_output.writeln ('\n retry: ${retry} ; max_retry: ${details.retry} ; r.exit_code: ${r.exit_code} ; trimmed_output.len: ${trimmed_output.len} ' )
709
+ failure_output.writeln (' retry: ${retry} ; max_retry: ${details.retry} ; r.exit_code: ${r.exit_code} ; trimmed_output.len: ${trimmed_output.len} ' )
706
710
failure_output.writeln (trimmed_output)
707
711
time.sleep (fail_retry_delay_ms)
708
712
}
@@ -722,11 +726,10 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
722
726
tls_bench.fail ()
723
727
cmd_duration = d_cmd.elapsed () - (fail_retry_delay_ms * details.retry)
724
728
ts.append_message_with_duration (.fail, tls_bench.step_message_with_label_and_duration (benchmark.b_fail,
725
- '${normalised_relative_file} \n retry: ${retry} \n comp_cmd: ${cmd} \n run_cmd: ${run_cmd} \n failure code: ${r.exit_code} ; foutput.len: ${full_failure_output.len} ; failure output:\n ${full_failure_output} ' ,
726
- cmd_duration,
729
+ '${normalised_relative_file} \n ${full_failure_output} ' , cmd_duration,
727
730
preparation: compile_cmd_duration
728
731
), cmd_duration, mtc)
729
- ts.add_failed_cmd (cmd )
732
+ ts.add_failed_cmd (reproduce_cmd )
730
733
return pool.no_result
731
734
}
732
735
}
0 commit comments