Skip to content

Commit

Permalink
Update the testsuite to include the explicit '--color' flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Sep 12, 2018
1 parent e7fb246 commit 4779dbf
Show file tree
Hide file tree
Showing 12 changed files with 180 additions and 180 deletions.
52 changes: 26 additions & 26 deletions tests/testsuite/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,14 +1261,14 @@ fn cargo_default_env_metadata_env_var() {
.with_stderr(&format!(
"\
[COMPILING] bar v0.0.1 ([CWD]/bar)
[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type dylib \
[RUNNING] `rustc --crate-name bar bar/src/lib.rs --color never --crate-type dylib \
--emit=dep-info,link \
-C prefer-dynamic -C debuginfo=2 \
-C metadata=[..] \
--out-dir [..] \
-L dependency=[CWD]/target/debug/deps`
[COMPILING] foo v0.0.1 ([CWD])
[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
--emit=dep-info,link -C debuginfo=2 \
-C metadata=[..] \
-C extra-filename=[..] \
Expand All @@ -1288,14 +1288,14 @@ fn cargo_default_env_metadata_env_var() {
.with_stderr(&format!(
"\
[COMPILING] bar v0.0.1 ([CWD]/bar)
[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type dylib \
[RUNNING] `rustc --crate-name bar bar/src/lib.rs --color never --crate-type dylib \
--emit=dep-info,link \
-C prefer-dynamic -C debuginfo=2 \
-C metadata=[..] \
--out-dir [..] \
-L dependency=[CWD]/target/debug/deps`
[COMPILING] foo v0.0.1 ([CWD])
[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
--emit=dep-info,link -C debuginfo=2 \
-C metadata=[..] \
-C extra-filename=[..] \
Expand Down Expand Up @@ -1616,7 +1616,7 @@ fn lto_build() {
.with_stderr(
"\
[COMPILING] test v0.0.0 ([CWD])
[RUNNING] `rustc --crate-name test src/main.rs --crate-type bin \
[RUNNING] `rustc --crate-name test src/main.rs --color never --crate-type bin \
--emit=dep-info,link \
-C opt-level=3 \
-C lto \
Expand All @@ -1635,7 +1635,7 @@ fn verbose_build() {
.with_stderr(
"\
[COMPILING] foo v0.0.1 ([CWD])
[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
--emit=dep-info,link -C debuginfo=2 \
-C metadata=[..] \
--out-dir [..] \
Expand All @@ -1652,7 +1652,7 @@ fn verbose_release_build() {
.with_stderr(
"\
[COMPILING] foo v0.0.1 ([CWD])
[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
--emit=dep-info,link \
-C opt-level=3 \
-C metadata=[..] \
Expand Down Expand Up @@ -1698,7 +1698,7 @@ fn verbose_release_build_deps() {
.with_stderr(&format!(
"\
[COMPILING] foo v0.0.0 ([CWD]/foo)
[RUNNING] `rustc --crate-name foo foo/src/lib.rs \
[RUNNING] `rustc --crate-name foo foo/src/lib.rs --color never \
--crate-type dylib --crate-type rlib \
--emit=dep-info,link \
-C prefer-dynamic \
Expand All @@ -1707,7 +1707,7 @@ fn verbose_release_build_deps() {
--out-dir [..] \
-L dependency=[CWD]/target/release/deps`
[COMPILING] test v0.0.0 ([CWD])
[RUNNING] `rustc --crate-name test src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name test src/lib.rs --color never --crate-type lib \
--emit=dep-info,link \
-C opt-level=3 \
-C metadata=[..] \
Expand Down Expand Up @@ -4099,41 +4099,41 @@ fn build_filter_infer_profile() {
p.cargo("build -v")
.with_stderr_contains(
"\
[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
--emit=dep-info,link[..]",
).with_stderr_contains(
"\
[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
--emit=dep-info,link[..]",
).run();

p.root().join("target").rm_rf();
p.cargo("build -v --test=t1")
.with_stderr_contains(
"\
[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
--emit=dep-info,link[..]",
).with_stderr_contains(
"[RUNNING] `rustc --crate-name t1 tests/t1.rs --emit=dep-info,link[..]",
"[RUNNING] `rustc --crate-name t1 tests/t1.rs --color never --emit=dep-info,link[..]",
).with_stderr_contains(
"\
[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
--emit=dep-info,link[..]",
).run();

p.root().join("target").rm_rf();
p.cargo("build -v --bench=b1")
.with_stderr_contains(
"\
[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
--emit=dep-info,link[..]",
).with_stderr_contains(
"\
[RUNNING] `rustc --crate-name b1 benches/b1.rs --emit=dep-info,link \
[RUNNING] `rustc --crate-name b1 benches/b1.rs --color never --emit=dep-info,link \
-C opt-level=3[..]",
).with_stderr_contains(
"\
[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
--emit=dep-info,link[..]",
).run();
}
Expand All @@ -4144,15 +4144,15 @@ fn targets_selected_default() {
p.cargo("build -v")
// bin
.with_stderr_contains("\
[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
--emit=dep-info,link[..]")
// bench
.with_stderr_does_not_contain("\
[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
-C opt-level=3 --test [..]")
// unit test
.with_stderr_does_not_contain("\
[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
-C debuginfo=2 --test [..]").run();
}

Expand All @@ -4162,15 +4162,15 @@ fn targets_selected_all() {
p.cargo("build -v --all-targets")
// bin
.with_stderr_contains("\
[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
--emit=dep-info,link[..]")
// bench
.with_stderr_contains("\
[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
-C opt-level=3 --test [..]")
// unit test
.with_stderr_contains("\
[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
-C debuginfo=2 --test [..]").run();
}

Expand All @@ -4180,15 +4180,15 @@ fn all_targets_no_lib() {
p.cargo("build -v --all-targets")
// bin
.with_stderr_contains("\
[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
--emit=dep-info,link[..]")
// bench
.with_stderr_contains("\
[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
-C opt-level=3 --test [..]")
// unit test
.with_stderr_contains("\
[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \
[RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
-C debuginfo=2 --test [..]").run();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/build_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn build_lib_only() {
.with_stderr(
"\
[COMPILING] foo v0.0.1 ([CWD])
[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
--emit=dep-info,link -C debuginfo=2 \
-C metadata=[..] \
--out-dir [..] \
Expand Down
8 changes: 4 additions & 4 deletions tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn custom_build_script_failed() {
.with_stderr(
"\
[COMPILING] foo v0.5.0 ([CWD])
[RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin [..]`
[RUNNING] `rustc --crate-name build_script_build build.rs --color never --crate-type bin [..]`
[RUNNING] `[..]/build-script-build`
[ERROR] failed to run custom build command for `foo v0.5.0 ([CWD])`
process didn't exit successfully: `[..]/build-script-build` (exit code: 101)",
Expand Down Expand Up @@ -955,19 +955,19 @@ fn build_cmd_with_a_build_cmd() {
[COMPILING] a v0.5.0 ([CWD]/a)
[RUNNING] `rustc [..] a/build.rs [..] --extern b=[..]`
[RUNNING] `[..]/a-[..]/build-script-build`
[RUNNING] `rustc --crate-name a [..]lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name a [..]lib.rs --color never --crate-type lib \
--emit=dep-info,link -C debuginfo=2 \
-C metadata=[..] \
--out-dir [..]target/debug/deps \
-L [..]target/debug/deps`
[COMPILING] foo v0.5.0 ([CWD])
[RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin \
[RUNNING] `rustc --crate-name build_script_build build.rs --color never --crate-type bin \
--emit=dep-info,link \
-C debuginfo=2 -C metadata=[..] --out-dir [..] \
-L [..]target/debug/deps \
--extern a=[..]liba[..].rlib`
[RUNNING] `[..]/foo-[..]/build-script-build`
[RUNNING] `rustc --crate-name foo [..]lib.rs --crate-type lib \
[RUNNING] `rustc --crate-name foo [..]lib.rs --color never --crate-type lib \
--emit=dep-info,link -C debuginfo=2 \
-C metadata=[..] \
--out-dir [..] \
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ fn check_filters() {
p.root().join("target").rm_rf();
p.cargo("check --tests -v")
.with_stderr_contains("[..] --crate-name foo src/lib.rs [..] --test [..]")
.with_stderr_contains("[..] --crate-name foo src/lib.rs --crate-type lib [..]")
.with_stderr_contains("[..] --crate-name foo src/lib.rs [..] --crate-type lib [..]")
.with_stderr_contains("[..] --crate-name foo src/main.rs [..] --test [..]")
.with_stderr_contains("[..]unused_unit_lib[..]")
.with_stderr_contains("[..]unused_unit_bin[..]")
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ fn linker_and_ar() {
.with_stderr_contains(&format!(
"\
[COMPILING] foo v0.5.0 ([CWD])
[RUNNING] `rustc --crate-name foo src/foo.rs --crate-type bin \
[RUNNING] `rustc --crate-name foo src/foo.rs --color never --crate-type bin \
--emit=dep-info,link -C debuginfo=2 \
-C metadata=[..] \
--out-dir [CWD]/target/{target}/debug/deps \
Expand Down
14 changes: 7 additions & 7 deletions tests/testsuite/profile_overrides.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,17 @@ fn profile_override_hierarchy() {
p.cargo("build -v").masquerade_as_nightly_cargo().with_stderr_unordered("\
[COMPILING] m3 [..]
[COMPILING] dep [..]
[RUNNING] `rustc --crate-name m3 m3/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=4 [..]
[RUNNING] `rustc --crate-name dep [..]dep/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=3 [..]
[RUNNING] `rustc --crate-name m3 m3/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 [..]
[RUNNING] `rustc --crate-name build_script_build m1/build.rs --crate-type bin --emit=dep-info,link -C codegen-units=4 [..]
[RUNNING] `rustc --crate-name m3 m3/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C codegen-units=4 [..]
[RUNNING] `rustc --crate-name dep [..]dep/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C codegen-units=3 [..]
[RUNNING] `rustc --crate-name m3 m3/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C codegen-units=1 [..]
[RUNNING] `rustc --crate-name build_script_build m1/build.rs --color never --crate-type bin --emit=dep-info,link -C codegen-units=4 [..]
[COMPILING] m2 [..]
[RUNNING] `rustc --crate-name build_script_build m2/build.rs --crate-type bin --emit=dep-info,link -C codegen-units=2 [..]
[RUNNING] `rustc --crate-name build_script_build m2/build.rs --color never --crate-type bin --emit=dep-info,link -C codegen-units=2 [..]
[RUNNING] `[..]/m1-[..]/build-script-build`
[RUNNING] `[..]/m2-[..]/build-script-build`
[RUNNING] `rustc --crate-name m2 m2/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=2 [..]
[RUNNING] `rustc --crate-name m2 m2/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C codegen-units=2 [..]
[COMPILING] m1 [..]
[RUNNING] `rustc --crate-name m1 m1/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 [..]
[RUNNING] `rustc --crate-name m1 m1/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C codegen-units=1 [..]
[FINISHED] dev [unoptimized + debuginfo] [..]
",
)
Expand Down
Loading

0 comments on commit 4779dbf

Please sign in to comment.