@@ -42,6 +42,8 @@ pub struct TestProps {
42
42
pub pretty_compare_only : bool ,
43
43
// Patterns which must not appear in the output of a cfail test.
44
44
pub forbid_output : Vec < String > ,
45
+ // Ignore errors which originate from a command line span
46
+ pub ignore_command_line : bool ,
45
47
}
46
48
47
49
// Load any test directives embedded in the file
@@ -60,6 +62,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
60
62
let mut pretty_mode = None ;
61
63
let mut pretty_compare_only = false ;
62
64
let mut forbid_output = Vec :: new ( ) ;
65
+ let mut ignore_command_line = false ;
66
+
63
67
iter_header ( testfile, |ln| {
64
68
match parse_error_pattern ( ln) {
65
69
Some ( ep) => error_patterns. push ( ep) ,
@@ -102,6 +106,10 @@ pub fn load_props(testfile: &Path) -> TestProps {
102
106
pretty_compare_only = parse_pretty_compare_only ( ln) ;
103
107
}
104
108
109
+ if !ignore_command_line {
110
+ ignore_command_line = parse_ignore_command_line ( ln) ;
111
+ }
112
+
105
113
match parse_aux_build ( ln) {
106
114
Some ( ab) => { aux_builds. push ( ab) ; }
107
115
None => { }
@@ -140,6 +148,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
140
148
pretty_mode : pretty_mode. unwrap_or ( "normal" . to_string ( ) ) ,
141
149
pretty_compare_only : pretty_compare_only,
142
150
forbid_output : forbid_output,
151
+ ignore_command_line : ignore_command_line,
143
152
}
144
153
}
145
154
@@ -291,6 +300,10 @@ fn parse_pretty_compare_only(line: &str) -> bool {
291
300
parse_name_directive ( line, "pretty-compare-only" )
292
301
}
293
302
303
+ fn parse_ignore_command_line ( line : & str ) -> bool {
304
+ parse_name_directive ( line, "ignore-command-line" )
305
+ }
306
+
294
307
fn parse_exec_env ( line : & str ) -> Option < ( String , String ) > {
295
308
parse_name_value_directive ( line, "exec-env" ) . map ( |nv| {
296
309
// nv is either FOO or FOO=BAR
0 commit comments