Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #42367

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
22c4ee3
Improve error message for const extern fn
Manishearth May 30, 2017
0fba1f7
Update rust-installer for Windows executable mode
cuviper Jun 1, 2017
0967e24
Deprecate Range*::step_by
scottmcm May 23, 2017
1723e06
Deprecate iter::range::StepBy
scottmcm May 30, 2017
15dff84
Avoid range::step_by in another test
scottmcm May 30, 2017
edefcb2
Don't byteswap Fingerprints when encoding
jcowgill May 31, 2017
a74338d
rustdoc: Rename `Vector` and `FixedVector` to `Slice` and `Array`
ollie27 May 31, 2017
c0ea51c
Reduce sccache log level.
Mark-Simulacrum Jun 1, 2017
56f448d
Quiet tests on PR tests
Mark-Simulacrum Jun 1, 2017
24671ba
Syntax highlight rust code in librustc/dep_graph/README.md
bjorn3 Jun 1, 2017
da100fe
Support VS 2017
brson May 24, 2017
4880ae8
rustbuild: Add `./x.py test --no-fail-fast`
cuviper Jun 1, 2017
a013d62
Rollup merge of #42225 - brson:vs2017, r=alexcrichton
Mark-Simulacrum Jun 1, 2017
7b77904
Rollup merge of #42310 - scottmcm:deprecate-range-stepby, r=alexcrichton
Mark-Simulacrum Jun 1, 2017
9a7c3fa
Rollup merge of #42319 - Manishearth:const-extern, r=nikomatsakis
Mark-Simulacrum Jun 1, 2017
de38b4b
Rollup merge of #42335 - jcowgill:fingerprint-be, r=michaelwoerister
Mark-Simulacrum Jun 1, 2017
0f6a7d4
Rollup merge of #42343 - cuviper:install-executables, r=alexcrichton
Mark-Simulacrum Jun 1, 2017
b96ed7f
Rollup merge of #42354 - Mark-Simulacrum:reduce-verbosity, r=alexcric…
Mark-Simulacrum Jun 1, 2017
adb856f
Rollup merge of #42355 - bjorn3:patch-1, r=Mark-Simulacrum
Mark-Simulacrum Jun 1, 2017
40a9335
Rollup merge of #42360 - ollie27:rustdoc_vector_rename, r=GuillaumeGomez
Mark-Simulacrum Jun 1, 2017
d85ce57
Rollup merge of #42363 - cuviper:no-fail-fast, r=alexcrichton
Mark-Simulacrum Jun 1, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ num_cpus = "1.0"
toml = "0.1"
getopts = "0.2"
rustc-serialize = "0.3"
gcc = "0.3.46"
gcc = "0.3.50"
libc = "0.2"
48 changes: 34 additions & 14 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ impl fmt::Display for TestKind {
}
}

fn try_run(build: &Build, cmd: &mut Command) {
if build.flags.cmd.no_fail_fast() {
if !build.try_run(cmd) {
let failures = build.delayed_failures.get();
build.delayed_failures.set(failures + 1);
}
} else {
build.run(cmd);
}
}

/// Runs the `linkchecker` tool as compiled in `stage` by the `host` compiler.
///
/// This tool in `src/tools` will verify the validity of all our links in the
Expand All @@ -67,8 +78,8 @@ pub fn linkcheck(build: &Build, host: &str) {
let compiler = Compiler::new(0, host);

let _time = util::timeit();
build.run(build.tool_cmd(&compiler, "linkchecker")
.arg(build.out.join(host).join("doc")));
try_run(build, build.tool_cmd(&compiler, "linkchecker")
.arg(build.out.join(host).join("doc")));
}

/// Runs the `cargotest` tool as compiled in `stage` by the `host` compiler.
Expand All @@ -87,10 +98,10 @@ pub fn cargotest(build: &Build, stage: u32, host: &str) {
let _time = util::timeit();
let mut cmd = Command::new(build.tool(&Compiler::new(0, host), "cargotest"));
build.prepare_tool_cmd(compiler, &mut cmd);
build.run(cmd.arg(&build.cargo)
.arg(&out_dir)
.env("RUSTC", build.compiler_path(compiler))
.env("RUSTDOC", build.rustdoc(compiler)))
try_run(build, cmd.arg(&build.cargo)
.arg(&out_dir)
.env("RUSTC", build.compiler_path(compiler))
.env("RUSTDOC", build.rustdoc(compiler)));
}

/// Runs `cargo test` for `cargo` packaged with Rust.
Expand All @@ -107,6 +118,9 @@ pub fn cargo(build: &Build, stage: u32, host: &str) {

let mut cargo = build.cargo(compiler, Mode::Tool, host, "test");
cargo.arg("--manifest-path").arg(build.src.join("src/tools/cargo/Cargo.toml"));
if build.flags.cmd.no_fail_fast() {
cargo.arg("--no-fail-fast");
}

// Don't build tests dynamically, just a pain to work with
cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
Expand All @@ -115,7 +129,7 @@ pub fn cargo(build: &Build, stage: u32, host: &str) {
// available.
cargo.env("CFG_DISABLE_CROSS_TESTS", "1");

build.run(cargo.env("PATH", newpath));
try_run(build, cargo.env("PATH", newpath));
}

/// Runs the `tidy` tool as compiled in `stage` by the `host` compiler.
Expand All @@ -131,7 +145,7 @@ pub fn tidy(build: &Build, host: &str) {
if !build.config.vendor {
cmd.arg("--no-vendor");
}
build.run(&mut cmd);
try_run(build, &mut cmd);
}

fn testdir(build: &Build, host: &str) -> PathBuf {
Expand Down Expand Up @@ -279,7 +293,7 @@ pub fn compiletest(build: &Build,
}

let _time = util::timeit();
build.run(&mut cmd);
try_run(build, &mut cmd);
}

/// Run `rustdoc --test` for all documentation in `src/doc`.
Expand Down Expand Up @@ -355,7 +369,7 @@ fn markdown_test(build: &Build, compiler: &Compiler, markdown: &Path) {
}
cmd.arg("--test-args").arg(test_args);

build.run(&mut cmd);
try_run(build, &mut cmd);
}

/// Run all unit tests plus documentation tests for an entire crate DAG defined
Expand Down Expand Up @@ -406,6 +420,9 @@ pub fn krate(build: &Build,
cargo.arg("--manifest-path")
.arg(build.src.join(path).join("Cargo.toml"))
.arg("--features").arg(features);
if test_kind.subcommand() == "test" && build.flags.cmd.no_fail_fast() {
cargo.arg("--no-fail-fast");
}

match krate {
Some(krate) => {
Expand Down Expand Up @@ -465,7 +482,7 @@ pub fn krate(build: &Build,
krate_remote(build, &compiler, target, mode);
} else {
cargo.args(&build.flags.cmd.test_args());
build.run(&mut cargo);
try_run(build, &mut cargo);
}
}

Expand All @@ -486,7 +503,7 @@ fn krate_emscripten(build: &Build,
if build.config.quiet_tests {
cmd.arg("--quiet");
}
build.run(&mut cmd);
try_run(build, &mut cmd);
}
}

Expand All @@ -508,7 +525,7 @@ fn krate_remote(build: &Build,
cmd.arg("--quiet");
}
cmd.args(&build.flags.cmd.test_args());
build.run(&mut cmd);
try_run(build, &mut cmd);
}
}

Expand Down Expand Up @@ -624,6 +641,9 @@ pub fn bootstrap(build: &Build) {
.current_dir(build.src.join("src/bootstrap"))
.env("CARGO_TARGET_DIR", build.out.join("bootstrap"))
.env("RUSTC", &build.rustc);
if build.flags.cmd.no_fail_fast() {
cmd.arg("--no-fail-fast");
}
cmd.arg("--").args(&build.flags.cmd.test_args());
build.run(&mut cmd);
try_run(build, &mut cmd);
}
14 changes: 13 additions & 1 deletion src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub enum Subcommand {
Test {
paths: Vec<PathBuf>,
test_args: Vec<String>,
no_fail_fast: bool,
},
Bench {
paths: Vec<PathBuf>,
Expand Down Expand Up @@ -141,7 +142,10 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");

// Some subcommands get extra options
match subcommand.as_str() {
"test" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); },
"test" => {
opts.optflag("", "no-fail-fast", "Run all tests regardless of failure");
opts.optmulti("", "test-args", "extra arguments", "ARGS");
},
"bench" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); },
_ => { },
};
Expand Down Expand Up @@ -263,6 +267,7 @@ Arguments:
Subcommand::Test {
paths: paths,
test_args: matches.opt_strs("test-args"),
no_fail_fast: matches.opt_present("no-fail-fast"),
}
}
"bench" => {
Expand Down Expand Up @@ -342,6 +347,13 @@ impl Subcommand {
_ => Vec::new(),
}
}

pub fn no_fail_fast(&self) -> bool {
match *self {
Subcommand::Test { no_fail_fast, .. } => no_fail_fast,
_ => false,
}
}
}

fn split(s: Vec<String>) -> Vec<String> {
Expand Down
Loading