File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,14 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[
5555 "// CHECK" ,
5656 "// EMIT_MIR" ,
5757 "// compile-flags" ,
58+ "//@ compile-flags" ,
5859 "// error-pattern" ,
60+ "//@ error-pattern" ,
5961 "// gdb" ,
6062 "// lldb" ,
6163 "// cdb" ,
6264 "// normalize-stderr-test" ,
65+ "//@ normalize-stderr-test" ,
6366] ;
6467
6568// Intentionally written in decimal rather than hex
@@ -128,7 +131,15 @@ fn should_ignore(line: &str) -> bool {
128131 // This mirrors the regex in src/tools/compiletest/src/runtest.rs, please
129132 // update both if either are changed.
130133 let re = Regex :: new ( "\\ s*//(\\ [.*\\ ])?~.*" ) . unwrap ( ) ;
131- re. is_match ( line) || ANNOTATIONS_TO_IGNORE . iter ( ) . any ( |a| line. contains ( a) )
134+ // For `ui_test`-style UI test directives, also ignore
135+ // - `//@[rev] compile-flags`
136+ // - `//@[rev] normalize-stderr-test`
137+ let ui_test_long_directives =
138+ Regex :: new ( "\\ s*//@(\\ [.*\\ ]) (compile-flags|normalize-stderr-test|error-pattern).*" )
139+ . unwrap ( ) ;
140+ re. is_match ( line)
141+ || ANNOTATIONS_TO_IGNORE . iter ( ) . any ( |a| line. contains ( a) )
142+ || ui_test_long_directives. is_match ( line)
132143}
133144
134145/// Returns `true` if `line` is allowed to be longer than the normal limit.
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use std::path::{Path, PathBuf};
1515const ENTRY_LIMIT : usize = 900 ;
1616// FIXME: The following limits should be reduced eventually.
1717const ISSUES_ENTRY_LIMIT : usize = 1794 ;
18- const ROOT_ENTRY_LIMIT : usize = 870 ;
18+ const ROOT_ENTRY_LIMIT : usize = 871 ;
1919
2020const EXPECTED_TEST_FILE_EXTENSIONS : & [ & str ] = & [
2121 "rs" , // test source files
You can’t perform that action at this time.
0 commit comments