@@ -150,6 +150,9 @@ pub struct TestProps {
150150 // empty before the test starts. Incremental mode tests will reuse the
151151 // incremental directory between passes in the same test.
152152 pub incremental : bool ,
153+ // Number of times to run the test, for the parallel front-end test suit.
154+ // Repeat tests to ensure no ICEs occur.
155+ pub iteration_count : Option < usize > ,
153156 // If `true`, this test is a known bug.
154157 //
155158 // When set, some requirements are relaxed. Currently, this only means no
@@ -238,6 +241,7 @@ mod directives {
238241 pub const ASSEMBLY_OUTPUT : & ' static str = "assembly-output" ;
239242 pub const STDERR_PER_BITWIDTH : & ' static str = "stderr-per-bitwidth" ;
240243 pub const INCREMENTAL : & ' static str = "incremental" ;
244+ pub const ITERATION_COUNT : & ' static str = "iteration-count" ;
241245 pub const KNOWN_BUG : & ' static str = "known-bug" ;
242246 pub const TEST_MIR_PASS : & ' static str = "test-mir-pass" ;
243247 pub const REMAP_SRC_BASE : & ' static str = "remap-src-base" ;
@@ -280,6 +284,7 @@ impl TestProps {
280284 forbid_output : vec ! [ ] ,
281285 incremental_dir : None ,
282286 incremental : false ,
287+ iteration_count : None ,
283288 known_bug : false ,
284289 pass_mode : None ,
285290 fail_mode : None ,
@@ -540,6 +545,16 @@ impl TestProps {
540545 & mut self . stderr_per_bitwidth ,
541546 ) ;
542547 config. set_name_directive ( ln, INCREMENTAL , & mut self . incremental ) ;
548+ config. set_name_value_directive (
549+ ln,
550+ ITERATION_COUNT ,
551+ & mut self . iteration_count ,
552+ |s| {
553+ s. trim ( )
554+ . parse ( )
555+ . expect ( "The value of iteration-count must be a positive integer." )
556+ } ,
557+ ) ;
543558
544559 // Unlike the other `name_value_directive`s this needs to be handled manually,
545560 // because it sets a `bool` flag.
@@ -892,6 +907,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
892907 "ignore-x86_64-pc-windows-gnu" ,
893908 "ignore-x86_64-unknown-linux-gnu" ,
894909 "incremental" ,
910+ "iteration-count" ,
895911 "known-bug" ,
896912 "llvm-cov-flags" ,
897913 "max-llvm-major-version" ,
0 commit comments