Skip to content

Commit 18173d0

Browse files
committed
---
yaml --- r: 272754 b: refs/heads/beta c: d78b4a9 h: refs/heads/master
1 parent ae95f32 commit 18173d0

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: c76125742a3d7ab9f6ad9fbaba8174f959adc18b
26+
refs/heads/beta: d78b4a93509174bed2080b627d74c956d2654366
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/compiletest/header.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct TestProps {
2222
// Lines that should be expected, in order, on standard out
2323
pub error_patterns: Vec<String> ,
2424
// Extra flags to pass to the compiler
25-
pub compile_flags: Option<String>,
25+
pub compile_flags: Vec<String>,
2626
// Extra flags to pass when the compiled code is run (such as --bench)
2727
pub run_flags: Option<String>,
2828
// If present, the name of a file that this test should match when
@@ -57,7 +57,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
5757
let error_patterns = Vec::new();
5858
let aux_builds = Vec::new();
5959
let exec_env = Vec::new();
60-
let compile_flags = None;
6160
let run_flags = None;
6261
let pp_exact = None;
6362
let check_lines = Vec::new();
@@ -70,7 +69,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
7069
let forbid_output = Vec::new();
7170
let mut props = TestProps {
7271
error_patterns: error_patterns,
73-
compile_flags: compile_flags,
72+
compile_flags: vec![],
7473
run_flags: run_flags,
7574
pp_exact: pp_exact,
7675
aux_builds: aux_builds,
@@ -95,8 +94,11 @@ pub fn load_props_into(props: &mut TestProps, testfile: &Path) {
9594
props.error_patterns.push(ep);
9695
}
9796

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()));
100102
}
101103

102104
if props.run_flags.is_none() {

branches/beta/src/compiletest/runtest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
275275
"-L".to_owned(),
276276
aux_dir.to_str().unwrap().to_owned());
277277
args.extend(split_maybe_args(&config.target_rustcflags));
278-
args.extend(split_maybe_args(&props.compile_flags));
278+
args.extend(props.compile_flags.iter().cloned());
279279
return ProcArgs {
280280
prog: config.rustc_path.to_str().unwrap().to_owned(),
281281
args: args,
@@ -322,7 +322,7 @@ actual:\n\
322322
"-L".to_owned(),
323323
aux_dir.to_str().unwrap().to_owned());
324324
args.extend(split_maybe_args(&config.target_rustcflags));
325-
args.extend(split_maybe_args(&props.compile_flags));
325+
args.extend(props.compile_flags.iter().cloned());
326326
// FIXME (#9639): This needs to handle non-utf8 paths
327327
return ProcArgs {
328328
prog: config.rustc_path.to_str().unwrap().to_owned(),
@@ -1184,7 +1184,7 @@ fn document(config: &Config,
11841184
"-o".to_owned(),
11851185
out_dir.to_str().unwrap().to_owned(),
11861186
testpaths.file.to_str().unwrap().to_owned()];
1187-
args.extend(split_maybe_args(&props.compile_flags));
1187+
args.extend(props.compile_flags.iter().cloned());
11881188
let args = ProcArgs {
11891189
prog: config.rustdoc_path.to_str().unwrap().to_owned(),
11901190
args: args,
@@ -1369,7 +1369,7 @@ fn make_compile_args<F>(config: &Config,
13691369
} else {
13701370
args.extend(split_maybe_args(&config.target_rustcflags));
13711371
}
1372-
args.extend(split_maybe_args(&props.compile_flags));
1372+
args.extend(props.compile_flags.iter().cloned());
13731373
return ProcArgs {
13741374
prog: config.rustc_path.to_str().unwrap().to_owned(),
13751375
args: args,

0 commit comments

Comments
 (0)