@@ -2,7 +2,7 @@ use std::collections::HashMap;
2
2
use std:: ffi:: { OsStr , OsString } ;
3
3
use std:: fs:: File ;
4
4
use std:: io:: { BufReader , BufWriter , Write } ;
5
- use std:: ops:: { Not , Range } ;
5
+ use std:: ops:: Not ;
6
6
use std:: path:: PathBuf ;
7
7
use std:: time:: Duration ;
8
8
use std:: { env, net, process} ;
@@ -178,8 +178,8 @@ impl Command {
178
178
Command :: Check { flags } => Self :: check ( flags) ,
179
179
Command :: Test { bless, flags, target, coverage } =>
180
180
Self :: test ( bless, flags, target, coverage) ,
181
- Command :: Run { dep, verbose, many_seeds , target, edition, flags } =>
182
- Self :: run ( dep, verbose, many_seeds , target, edition, flags) ,
181
+ Command :: Run { dep, verbose, target, edition, flags } =>
182
+ Self :: run ( dep, verbose, target, edition, flags) ,
183
183
Command :: Doc { flags } => Self :: doc ( flags) ,
184
184
Command :: Fmt { flags } => Self :: fmt ( flags) ,
185
185
Command :: Clippy { flags } => Self :: clippy ( flags) ,
@@ -586,7 +586,6 @@ impl Command {
586
586
fn run (
587
587
dep : bool ,
588
588
verbose : bool ,
589
- many_seeds : Option < Range < u32 > > ,
590
589
target : Option < String > ,
591
590
edition : Option < String > ,
592
591
flags : Vec < String > ,
@@ -614,48 +613,34 @@ impl Command {
614
613
early_flags. push ( "--sysroot" . into ( ) ) ;
615
614
early_flags. push ( miri_sysroot. into ( ) ) ;
616
615
617
- // Compute everything needed to run the actual command. Also add MIRIFLAGS .
616
+ // Compute flags .
618
617
let miri_flags = e. sh . var ( "MIRIFLAGS" ) . unwrap_or_default ( ) ;
619
618
let miri_flags = flagsplit ( & miri_flags) ;
620
619
let quiet_flag = if verbose { None } else { Some ( "--quiet" ) } ;
621
- // This closure runs the command with the given `seed_flag` added between the MIRIFLAGS and
622
- // the `flags` given on the command-line.
623
- let run_miri = |e : & MiriEnv , seed_flag : Option < String > | -> Result < ( ) > {
624
- // The basic command that executes the Miri driver.
625
- let mut cmd = if dep {
626
- // We invoke the test suite as that has all the logic for running with dependencies.
627
- e. cargo_cmd ( "." , "test" )
628
- . args ( & [ "--test" , "ui" ] )
629
- . args ( quiet_flag)
630
- . arg ( "--" )
631
- . args ( & [ "--miri-run-dep-mode" ] )
632
- } else {
633
- cmd ! ( e. sh, "{miri_bin}" )
634
- } ;
635
- cmd. set_quiet ( !verbose) ;
636
- // Add Miri flags
637
- let mut cmd = cmd. args ( & miri_flags) . args ( & seed_flag) . args ( & early_flags) . args ( & flags) ;
638
- // For `--dep` we also need to set the target in the env var.
639
- if dep {
640
- if let Some ( target) = & target {
641
- cmd = cmd. env ( "MIRI_TEST_TARGET" , target) ;
642
- }
643
- }
644
- // And run the thing.
645
- Ok ( cmd. run ( ) ?)
646
- } ;
647
- // Run the closure once or many times.
648
- if let Some ( seed_range) = many_seeds {
649
- e. run_many_times ( seed_range, |e, seed| {
650
- eprintln ! ( "Trying seed: {seed}" ) ;
651
- run_miri ( e, Some ( format ! ( "-Zmiri-seed={seed}" ) ) ) . inspect_err ( |_| {
652
- eprintln ! ( "FAILING SEED: {seed}" ) ;
653
- } )
654
- } ) ?;
620
+
621
+ // Run Miri.
622
+ // The basic command that executes the Miri driver.
623
+ let mut cmd = if dep {
624
+ // We invoke the test suite as that has all the logic for running with dependencies.
625
+ e. cargo_cmd ( "." , "test" )
626
+ . args ( & [ "--test" , "ui" ] )
627
+ . args ( quiet_flag)
628
+ . arg ( "--" )
629
+ . args ( & [ "--miri-run-dep-mode" ] )
655
630
} else {
656
- run_miri ( & e, None ) ?;
631
+ cmd ! ( e. sh, "{miri_bin}" )
632
+ } ;
633
+ cmd. set_quiet ( !verbose) ;
634
+ // Add Miri flags
635
+ let mut cmd = cmd. args ( & miri_flags) . args ( & early_flags) . args ( & flags) ;
636
+ // For `--dep` we also need to set the target in the env var.
637
+ if dep {
638
+ if let Some ( target) = & target {
639
+ cmd = cmd. env ( "MIRI_TEST_TARGET" , target) ;
640
+ }
657
641
}
658
- Ok ( ( ) )
642
+ // Finally, run the thing.
643
+ Ok ( cmd. run ( ) ?)
659
644
}
660
645
661
646
fn fmt ( flags : Vec < String > ) -> Result < ( ) > {
0 commit comments