Skip to content

Commit e664e7e

Browse files
committed
Move RUST_TEST_NOCAPTURE warning to early config check
1 parent f03074d commit e664e7e

File tree

1 file changed

+7
-6
lines changed
  • src/tools/compiletest/src

1 file changed

+7
-6
lines changed

src/tools/compiletest/src/lib.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ use crate::util::logv;
5151
/// some code here that inspects environment variables or even runs executables
5252
/// (e.g. when discovering debugger versions).
5353
pub fn parse_config(args: Vec<String>) -> Config {
54-
if env::var("RUST_TEST_NOCAPTURE").is_ok() {
55-
eprintln!(
56-
"WARNING: RUST_TEST_NOCAPTURE is not supported. Use the `--no-capture` flag instead."
57-
);
58-
}
59-
6054
let mut opts = Options::new();
6155
opts.reqopt("", "compile-lib-path", "path to host shared libraries", "PATH")
6256
.reqopt("", "run-lib-path", "path to target shared libraries", "PATH")
@@ -1125,4 +1119,11 @@ WARNING: profiler runtime is not available, so `.coverage` files won't be {actio
11251119
help: try setting `profiler = true` in the `[build]` section of `bootstrap.toml`"#
11261120
);
11271121
}
1122+
1123+
// `RUST_TEST_NOCAPTURE` is a libtest env var, but we don't callout to libtest.
1124+
if env::var("RUST_TEST_NOCAPTURE").is_ok() {
1125+
eprintln!(
1126+
"WARNING: RUST_TEST_NOCAPTURE is not supported. Use the `--no-capture` flag instead."
1127+
);
1128+
}
11281129
}

0 commit comments

Comments
 (0)