@@ -587,25 +587,50 @@ fn bisect(cfg: &Config, client: &Client) -> Result<(), Error> {
587
587
bisect_ci_via ( cfg, client, & * cfg. repo_access , & working_commit, & bad_commit) ?;
588
588
589
589
print_results ( cfg, client, & ci_bisection_result) ;
590
- print_final_report ( & nightly_bisection_result, & ci_bisection_result) ;
590
+ print_final_report ( cfg , & nightly_bisection_result, & ci_bisection_result) ;
591
591
}
592
592
}
593
593
594
594
Ok ( ( ) )
595
595
}
596
596
597
+ fn searched_range (
598
+ cfg : & Config ,
599
+ searched_toolchains : & Vec < Toolchain > ,
600
+ ) -> ( ToolchainSpec , ToolchainSpec ) {
601
+ let first_toolchain = searched_toolchains. first ( ) . unwrap ( ) . spec . clone ( ) ;
602
+ let last_toolchain = searched_toolchains. last ( ) . unwrap ( ) . spec . clone ( ) ;
603
+
604
+ match ( & first_toolchain, & last_toolchain) {
605
+ ( ToolchainSpec :: Ci { .. } , ToolchainSpec :: Ci { .. } ) => ( first_toolchain, last_toolchain) ,
606
+
607
+ _ => {
608
+ let start_toolchain = if let Some ( Bound :: Date ( date) ) = cfg. args . start {
609
+ ToolchainSpec :: Nightly { date }
610
+ } else {
611
+ first_toolchain
612
+ } ;
613
+
614
+ (
615
+ start_toolchain,
616
+ ToolchainSpec :: Nightly {
617
+ date : get_end_date ( cfg) ,
618
+ } ,
619
+ )
620
+ }
621
+ }
622
+ }
623
+
597
624
fn print_results ( cfg : & Config , client : & Client , bisection_result : & BisectionResult ) {
598
625
let BisectionResult {
599
626
searched : toolchains,
600
627
dl_spec,
601
628
found,
602
629
} = bisection_result;
603
630
604
- eprintln ! (
605
- "searched toolchains {} through {}" ,
606
- toolchains. first( ) . unwrap( ) ,
607
- toolchains. last( ) . unwrap( ) ,
608
- ) ;
631
+ let ( start, end) = searched_range ( cfg, toolchains) ;
632
+
633
+ eprintln ! ( "searched toolchains {} through {}" , start, end) ;
609
634
610
635
if toolchains[ * found] == * toolchains. last ( ) . unwrap ( ) {
611
636
let t = & toolchains[ * found] ;
@@ -645,6 +670,7 @@ fn print_results(cfg: &Config, client: &Client, bisection_result: &BisectionResu
645
670
}
646
671
647
672
fn print_final_report (
673
+ cfg : & Config ,
648
674
nightly_bisection_result : & BisectionResult ,
649
675
ci_bisection_result : & BisectionResult ,
650
676
) {
@@ -676,11 +702,9 @@ fn print_final_report(
676
702
eprintln ! ( "# Regression found in the compiler" ) ;
677
703
eprintln ! ( "" ) ;
678
704
679
- eprintln ! (
680
- "searched nightlies: from {} to {}" ,
681
- nightly_toolchains. first( ) . unwrap( ) ,
682
- nightly_toolchains. last( ) . unwrap( ) ,
683
- ) ;
705
+ let ( start, end) = searched_range ( cfg, nightly_toolchains) ;
706
+
707
+ eprintln ! ( "searched nightlies: from {} to {}" , start, end) ;
684
708
685
709
eprintln ! ( "regressed nightly: {}" , nightly_toolchains[ * nightly_found] , ) ;
686
710
0 commit comments