@@ -22,7 +22,7 @@ pub struct TestProps {
22
22
// Lines that should be expected, in order, on standard out
23
23
pub error_patterns : Vec < String > ,
24
24
// Extra flags to pass to the compiler
25
- pub compile_flags : Option < String > ,
25
+ pub compile_flags : Vec < String > ,
26
26
// Extra flags to pass when the compiled code is run (such as --bench)
27
27
pub run_flags : Option < String > ,
28
28
// If present, the name of a file that this test should match when
@@ -57,7 +57,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
57
57
let error_patterns = Vec :: new ( ) ;
58
58
let aux_builds = Vec :: new ( ) ;
59
59
let exec_env = Vec :: new ( ) ;
60
- let compile_flags = None ;
61
60
let run_flags = None ;
62
61
let pp_exact = None ;
63
62
let check_lines = Vec :: new ( ) ;
@@ -70,7 +69,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
70
69
let forbid_output = Vec :: new ( ) ;
71
70
let mut props = TestProps {
72
71
error_patterns : error_patterns,
73
- compile_flags : compile_flags ,
72
+ compile_flags : vec ! [ ] ,
74
73
run_flags : run_flags,
75
74
pp_exact : pp_exact,
76
75
aux_builds : aux_builds,
@@ -95,8 +94,11 @@ pub fn load_props_into(props: &mut TestProps, testfile: &Path) {
95
94
props. error_patterns . push ( ep) ;
96
95
}
97
96
98
- if props. compile_flags . is_none ( ) {
99
- props. compile_flags = parse_compile_flags ( ln) ;
97
+ if let Some ( flags) = parse_compile_flags ( ln) {
98
+ props. compile_flags . extend (
99
+ flags
100
+ . split_whitespace ( )
101
+ . map ( |s| s. to_owned ( ) ) ) ;
100
102
}
101
103
102
104
if props. run_flags . is_none ( ) {
0 commit comments