summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/build_script_env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/tests/testsuite/build_script_env.rs')
-rw-r--r--src/tools/cargo/tests/testsuite/build_script_env.rs22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/tools/cargo/tests/testsuite/build_script_env.rs b/src/tools/cargo/tests/testsuite/build_script_env.rs
index df574600c..afa2925f1 100644
--- a/src/tools/cargo/tests/testsuite/build_script_env.rs
+++ b/src/tools/cargo/tests/testsuite/build_script_env.rs
@@ -137,12 +137,12 @@ fn rustc_bootstrap() {
// NOTE: uses RUSTC_BOOTSTRAP so it will be propagated to rustc
// (this matters when tests are being run with a beta or stable cargo)
.env("RUSTC_BOOTSTRAP", "1")
- .with_stderr_contains("warning: Cannot set `RUSTC_BOOTSTRAP=1` [..]")
+ .with_stderr_contains("warning: has-dashes@0.0.1: Cannot set `RUSTC_BOOTSTRAP=1` [..]")
.run();
// RUSTC_BOOTSTRAP set to the name of the library should warn
p.cargo("check")
.env("RUSTC_BOOTSTRAP", "has_dashes")
- .with_stderr_contains("warning: Cannot set `RUSTC_BOOTSTRAP=1` [..]")
+ .with_stderr_contains("warning: has-dashes@0.0.1: Cannot set `RUSTC_BOOTSTRAP=1` [..]")
.run();
// RUSTC_BOOTSTRAP set to some random value should error
p.cargo("check")
@@ -169,7 +169,7 @@ fn rustc_bootstrap() {
// NOTE: uses RUSTC_BOOTSTRAP so it will be propagated to rustc
// (this matters when tests are being run with a beta or stable cargo)
.env("RUSTC_BOOTSTRAP", "1")
- .with_stderr_contains("warning: Cannot set `RUSTC_BOOTSTRAP=1` [..]")
+ .with_stderr_contains("warning: foo@0.0.1: Cannot set `RUSTC_BOOTSTRAP=1` [..]")
.run();
// RUSTC_BOOTSTRAP conditionally set when there's no library should error (regardless of the value)
p.cargo("check")
@@ -181,6 +181,22 @@ fn rustc_bootstrap() {
}
#[cargo_test]
+fn build_script_env_verbose() {
+ let build_rs = r#"
+ fn main() {}
+ "#;
+ let p = project()
+ .file("Cargo.toml", &basic_manifest("verbose-build", "0.0.1"))
+ .file("src/lib.rs", "")
+ .file("build.rs", build_rs)
+ .build();
+
+ p.cargo("check -vv")
+ .with_stderr_contains("[RUNNING] `[..]CARGO=[..]build-script-build`")
+ .run();
+}
+
+#[cargo_test]
#[cfg(target_arch = "x86_64")]
fn build_script_sees_cfg_target_feature() {
let build_rs = r#"