Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.

This commit is contained in:
Ms2ger 2015-03-11 11:08:57 +01:00 committed by Josh Matthews
parent 65d4b12bf2
commit 5f15eb5fbf
140 changed files with 1420 additions and 1222 deletions

View file

@ -13,7 +13,7 @@ extern crate getopts;
extern crate test;
use test::{AutoColor, TestOpts, run_tests_console, TestDesc, TestDescAndFn, DynTestFn, DynTestName};
use test::ShouldFail;
use test::ShouldPanic;
use getopts::{getopts, reqopt};
use std::{str, env};
use std::old_io::fs;
@ -30,7 +30,7 @@ struct Config {
fn main() {
let args = env::args();
let config = parse_config(args.map(|x| x.into_string().unwrap()).collect());
let config = parse_config(args.collect());
let opts = test_options(config.clone());
let tests = find_tests(config);
match run_tests_console(&opts, tests) {
@ -81,7 +81,7 @@ fn make_test(file: String) -> TestDescAndFn {
desc: TestDesc {
name: DynTestName(file.clone()),
ignore: false,
should_fail: ShouldFail::No,
should_panic: ShouldPanic::No,
},
testfn: DynTestFn(Thunk::new(move || { run_test(file) }))
}
@ -100,7 +100,7 @@ fn run_test(file: String) {
true => prc_arg.join("servo"),
_ => panic!("could not pop directory"),
};
let mut prc = match Command::new(prc_arg)
let mut prc = match Command::new(prc_arg.to_str().unwrap())
.args(args.as_slice())
.stdin(Ignored)
.stdout(stdout)

View file

@ -21,7 +21,7 @@ use std::old_io::process::ExitStatus;
use std::old_io::fs::PathExtensions;
use std::old_path::Path;
use std::thunk::Thunk;
use test::{AutoColor, DynTestName, DynTestFn, TestDesc, TestOpts, TestDescAndFn, ShouldFail};
use test::{AutoColor, DynTestName, DynTestFn, TestDesc, TestOpts, TestDescAndFn, ShouldPanic};
use test::run_tests_console;
use url::Url;
@ -38,7 +38,7 @@ bitflags!(
fn main() {
let args: Vec<String> = env::args().map(|arg| arg.into_string().ok().expect("argument ws not a String")).collect();
let args: Vec<String> = env::args().collect();
let mut parts = args.tail().split(|e| "--" == e.as_slice());
let harness_args = parts.next().unwrap(); // .split() is never empty
@ -183,12 +183,7 @@ fn parse_lists(file: &Path, servo_args: &[String], render_mode: RenderMode, id_o
part => panic!("reftest line: '{}' has invalid kind '{}'", line, part)
};
// If we're running this directly, file.dir_path() might be relative.
// (see issue #3521)
let base = match file.dir_path().is_relative() {
true => env::current_dir().unwrap().join(file.dir_path()),
false => file.dir_path()
};
let base = Path::new(env::current_dir().unwrap().to_str().unwrap()).join(file.dir_path());
let file_left = base.join(test_line.file_left);
let file_right = base.join(test_line.file_right);
@ -239,7 +234,7 @@ fn make_test(reftest: Reftest) -> TestDescAndFn {
desc: TestDesc {
name: DynTestName(name),
ignore: false,
should_fail: ShouldFail::No,
should_panic: ShouldPanic::No,
},
testfn: DynTestFn(Thunk::new(move || {
check_reftest(reftest);
@ -293,7 +288,7 @@ fn capture(reftest: &Reftest, side: usize) -> (u32, u32, Vec<u8>) {
fn servo_path() -> Path {
let current_exe = env::current_exe().ok().expect("Could not locate current executable");
current_exe.dir_path().join("servo")
Path::new(current_exe.to_str().unwrap()).dir_path().join("servo")
}
fn check_reftest(reftest: Reftest) {
@ -311,7 +306,7 @@ fn check_reftest(reftest: Reftest) {
}
let pixels = left_bytes.iter().zip(right_bytes.iter()).map(|(&a, &b)| {
if a as i8 - b as i8 == 0 {
if a == b {
// White for correct
0xFF
} else {

View file

@ -22,12 +22,6 @@
[XMLHttpRequest: status/statusText - various responses 23 (HEAD 503)]
expected: TIMEOUT
[XMLHttpRequest: status/statusText - various responses 25 (GET 699)]
expected: FAIL
[XMLHttpRequest: status/statusText - various responses 26 (HEAD 699)]
expected: FAIL
[XMLHttpRequest: status/statusText - various responses 27 (CHICKEN 699)]
expected: FAIL
expected: TIMEOUT

View file

@ -1,14 +0,0 @@
[status-error.htm]
type: testharness
[XMLHttpRequest: status error handling GET 699]
expected: FAIL
[XMLHttpRequest: status error handling HEAD 699]
expected: FAIL
[XMLHttpRequest: status error handling POST 699]
expected: FAIL
[XMLHttpRequest: status error handling PUT 699]
expected: FAIL

View file

@ -1,6 +1,7 @@
[004.html]
type: testharness
expected: TIMEOUT
disabled: flaky crash detection
[importScripts broken script]
expected: TIMEOUT

View file

@ -1,6 +1,7 @@
[005.html]
type: testharness
expected: TIMEOUT
disabled: flaky crash detection
[importScripts separate scripts]
expected: TIMEOUT

View file

@ -1,6 +1,7 @@
[006.html]
type: testharness
expected: TIMEOUT
disabled: flaky crash detection
[importScripts uncaught exception]
expected: TIMEOUT

View file

@ -9,6 +9,8 @@ binary_dir=$wpt_root/../../components/servo/target
if [[ $1 == "--release" ]]; then
binary_dir=$binary_dir/release
shift
else
binary_dir=$binary_dir/debug
fi
PYTHON=$(which python2 2> /dev/null || echo python)