@@ -150,6 +150,9 @@ pub struct TestProps {
150
150
// empty before the test starts. Incremental mode tests will reuse the
151
151
// incremental directory between passes in the same test.
152
152
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 > ,
153
156
// If `true`, this test is a known bug.
154
157
//
155
158
// When set, some requirements are relaxed. Currently, this only means no
@@ -238,6 +241,7 @@ mod directives {
238
241
pub const ASSEMBLY_OUTPUT : & ' static str = "assembly-output" ;
239
242
pub const STDERR_PER_BITWIDTH : & ' static str = "stderr-per-bitwidth" ;
240
243
pub const INCREMENTAL : & ' static str = "incremental" ;
244
+ pub const ITERATION_COUNT : & ' static str = "iteration-count" ;
241
245
pub const KNOWN_BUG : & ' static str = "known-bug" ;
242
246
pub const TEST_MIR_PASS : & ' static str = "test-mir-pass" ;
243
247
pub const REMAP_SRC_BASE : & ' static str = "remap-src-base" ;
@@ -280,6 +284,7 @@ impl TestProps {
280
284
forbid_output : vec ! [ ] ,
281
285
incremental_dir : None ,
282
286
incremental : false ,
287
+ iteration_count : None ,
283
288
known_bug : false ,
284
289
pass_mode : None ,
285
290
fail_mode : None ,
@@ -540,6 +545,16 @@ impl TestProps {
540
545
& mut self . stderr_per_bitwidth ,
541
546
) ;
542
547
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
+ ) ;
543
558
544
559
// Unlike the other `name_value_directive`s this needs to be handled manually,
545
560
// because it sets a `bool` flag.
@@ -892,6 +907,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
892
907
"ignore-x86_64-pc-windows-gnu" ,
893
908
"ignore-x86_64-unknown-linux-gnu" ,
894
909
"incremental" ,
910
+ "iteration-count" ,
895
911
"known-bug" ,
896
912
"llvm-cov-flags" ,
897
913
"max-llvm-major-version" ,
0 commit comments