Skip to content

Commit c1e7e6f

Browse files
committed
---
yaml --- r: 95419 b: refs/heads/dist-snap c: abecd61 h: refs/heads/master i: 95417: 7ef17e2 95415: c295b81 v: v3
1 parent a477b35 commit c1e7e6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2799
-6337
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 40180cdbea708307ca66dc6debddbd5ecc1ea41c
9+
refs/heads/dist-snap: abecd61a230d7057aeb1dc6d82e3c8101c7d9337
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/compiletest/compiletest.rs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ pub fn parse_config(args: ~[~str]) -> config {
102102
}
103103

104104
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
105-
Path::new(m.opt_str(nm).unwrap())
105+
Path(m.opt_str(nm).unwrap())
106106
}
107107

108108
config {
109109
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
110110
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
111111
rustc_path: opt_path(matches, "rustc-path"),
112-
clang_path: matches.opt_str("clang-path").map(|s| Path::new(s)),
113-
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| Path::new(s)),
112+
clang_path: matches.opt_str("clang-path").map(|s| Path(s)),
113+
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| Path(s)),
114114
src_base: opt_path(matches, "src-base"),
115115
build_base: opt_path(matches, "build-base"),
116116
aux_base: opt_path(matches, "aux-base"),
@@ -123,10 +123,10 @@ pub fn parse_config(args: ~[~str]) -> config {
123123
} else {
124124
None
125125
},
126-
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
127-
save_metrics: matches.opt_str("save-metrics").map(|s| Path::new(s)),
126+
logfile: matches.opt_str("logfile").map(|s| Path(s)),
127+
save_metrics: matches.opt_str("save-metrics").map(|s| Path(s)),
128128
ratchet_metrics:
129-
matches.opt_str("ratchet-metrics").map(|s| Path::new(s)),
129+
matches.opt_str("ratchet-metrics").map(|s| Path(s)),
130130
ratchet_noise_percent:
131131
matches.opt_str("ratchet-noise-percent").and_then(|s| from_str::<f64>(s)),
132132
runtool: matches.opt_str("runtool"),
@@ -155,9 +155,9 @@ pub fn log_config(config: &config) {
155155
logv(c, format!("configuration:"));
156156
logv(c, format!("compile_lib_path: {}", config.compile_lib_path));
157157
logv(c, format!("run_lib_path: {}", config.run_lib_path));
158-
logv(c, format!("rustc_path: {}", config.rustc_path.display()));
159-
logv(c, format!("src_base: {}", config.src_base.display()));
160-
logv(c, format!("build_base: {}", config.build_base.display()));
158+
logv(c, format!("rustc_path: {}", config.rustc_path.to_str()));
159+
logv(c, format!("src_base: {}", config.src_base.to_str()));
160+
logv(c, format!("build_base: {}", config.build_base.to_str()));
161161
logv(c, format!("stage_id: {}", config.stage_id));
162162
logv(c, format!("mode: {}", mode_str(config.mode)));
163163
logv(c, format!("run_ignored: {}", config.run_ignored));
@@ -245,12 +245,12 @@ pub fn test_opts(config: &config) -> test::TestOpts {
245245

246246
pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
247247
debug2!("making tests from {}",
248-
config.src_base.display());
248+
config.src_base.to_str());
249249
let mut tests = ~[];
250250
let dirs = os::list_dir_path(&config.src_base);
251251
for file in dirs.iter() {
252252
let file = file.clone();
253-
debug2!("inspecting file {}", file.display());
253+
debug2!("inspecting file {}", file.to_str());
254254
if is_test(config, &file) {
255255
let t = do make_test(config, &file) {
256256
match config.mode {
@@ -272,7 +272,7 @@ pub fn is_test(config: &config, testfile: &Path) -> bool {
272272
_ => ~[~".rc", ~".rs"]
273273
};
274274
let invalid_prefixes = ~[~".", ~"#", ~"~"];
275-
let name = testfile.filename_str().unwrap();
275+
let name = testfile.filename().unwrap();
276276

277277
let mut valid = false;
278278

@@ -303,9 +303,9 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName {
303303

304304
// Try to elide redundant long paths
305305
fn shorten(path: &Path) -> ~str {
306-
let filename = path.filename_str();
307-
let p = path.dir_path();
308-
let dir = p.filename_str();
306+
let filename = path.filename();
307+
let p = path.pop();
308+
let dir = p.filename();
309309
format!("{}/{}", dir.unwrap_or(""), filename.unwrap_or(""))
310310
}
311311

@@ -317,15 +317,13 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName {
317317
pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn {
318318
use std::cell::Cell;
319319
let config = Cell::new((*config).clone());
320-
// FIXME (#9639): This needs to handle non-utf8 paths
321-
let testfile = Cell::new(testfile.as_str().unwrap().to_owned());
320+
let testfile = Cell::new(testfile.to_str());
322321
test::DynTestFn(|| { runtest::run(config.take(), testfile.take()) })
323322
}
324323

325324
pub fn make_metrics_test_closure(config: &config, testfile: &Path) -> test::TestFn {
326325
use std::cell::Cell;
327326
let config = Cell::new((*config).clone());
328-
// FIXME (#9639): This needs to handle non-utf8 paths
329-
let testfile = Cell::new(testfile.as_str().unwrap().to_owned());
327+
let testfile = Cell::new(testfile.to_str());
330328
test::DynMetricFn(|mm| { runtest::run_metrics(config.take(), testfile.take(), mm) })
331329
}

branches/dist-snap/src/compiletest/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
161161

162162
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<Path> {
163163
match parse_name_value_directive(line, ~"pp-exact") {
164-
Some(s) => Some(Path::new(s)),
164+
Some(s) => Some(Path(s)),
165165
None => {
166166
if parse_name_directive(line, "pp-exact") {
167-
testfile.filename().map(|s| Path::new(s))
167+
Some(testfile.file_path())
168168
} else {
169169
None
170170
}

0 commit comments

Comments
 (0)