@@ -512,7 +512,7 @@ impl Toolchain {
512
512
Ok ( ( ) )
513
513
}
514
514
515
- fn test ( & self , cfg : & Config , dl_spec : & DownloadParams ) -> TestOutcome {
515
+ fn test ( & self , cfg : & Config ) -> TestOutcome {
516
516
let outcome = if cfg. args . prompt {
517
517
loop {
518
518
let status = self . run_test ( cfg) ;
@@ -540,10 +540,6 @@ impl Toolchain {
540
540
}
541
541
} ;
542
542
543
- if !cfg. args . preserve {
544
- let _ = self . remove ( dl_spec) ;
545
- }
546
-
547
543
outcome
548
544
}
549
545
@@ -840,7 +836,7 @@ fn bisect(cfg: &Config, client: &Client) -> Result<(), Error> {
840
836
let t = & toolchains[ found] ;
841
837
let r = match t. install ( & client, & dl_spec) {
842
838
Ok ( ( ) ) => {
843
- let outcome = t. test ( & cfg, & dl_spec ) ;
839
+ let outcome = t. test ( & cfg) ;
844
840
if !cfg. args . preserve {
845
841
let _ = t. remove ( & dl_spec) ;
846
842
}
@@ -982,7 +978,12 @@ fn bisect_nightlies(cfg: &Config, client: &Client) -> Result<BisectionResult, Er
982
978
}
983
979
match t. install ( client, & dl_spec) {
984
980
Ok ( ( ) ) => {
985
- let outcome = t. test ( & cfg, & dl_spec) ;
981
+ let outcome = t. test ( & cfg) ;
982
+
983
+ if !cfg. args . preserve {
984
+ let _ = t. remove ( & dl_spec) ;
985
+ }
986
+
986
987
if let TestOutcome :: Baseline = outcome {
987
988
first_success = Some ( nightly_date) ;
988
989
break ;
@@ -993,10 +994,6 @@ fn bisect_nightlies(cfg: &Config, client: &Client) -> Result<BisectionResult, Er
993
994
}
994
995
995
996
nightly_date = nightly_iter. next ( ) . unwrap ( ) ;
996
-
997
- if !cfg. args . preserve {
998
- let _ = t. remove ( & dl_spec) ;
999
- }
1000
997
}
1001
998
Err ( InstallError :: NotFound { .. } ) => {
1002
999
// go back just one day, presumably missing nightly
@@ -1030,7 +1027,7 @@ fn bisect_nightlies(cfg: &Config, client: &Client) -> Result<BisectionResult, Er
1030
1027
let found = least_satisfying ( & toolchains, |t| {
1031
1028
match t. install ( & client, & dl_spec) {
1032
1029
Ok ( ( ) ) => {
1033
- let outcome = t. test ( & cfg, & dl_spec ) ;
1030
+ let outcome = t. test ( & cfg) ;
1034
1031
// we want to fail, so a successful build doesn't satisfy us
1035
1032
let r = match outcome {
1036
1033
TestOutcome :: Baseline => Satisfies :: No ,
@@ -1139,7 +1136,7 @@ fn bisect_ci(cfg: &Config, client: &Client) -> Result<BisectionResult, Error> {
1139
1136
match t. install ( & client, & dl_spec) {
1140
1137
Ok ( ( ) ) => {
1141
1138
eprintln ! ( "testing {}" , t) ;
1142
- let outcome = t. test ( & cfg, & dl_spec ) ;
1139
+ let outcome = t. test ( & cfg) ;
1143
1140
// we want to fail, so a successful build doesn't satisfy us
1144
1141
let r = match outcome {
1145
1142
TestOutcome :: Regressed => Satisfies :: Yes ,
0 commit comments