Skip to content

Commit bccc11e

Browse files
committed
compiletest: Replace --nocapture with --no-capture
1 parent 4fd3baa commit bccc11e

File tree

2 files changed

+8
-2
lines changed
  • src

2 files changed

+8
-2
lines changed

src/bootstrap/src/core/build_steps/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
18301830
}
18311831

18321832
if builder.config.cmd.no_capture() {
1833-
cmd.arg("--nocapture");
1833+
cmd.arg("--no-capture");
18341834
}
18351835

18361836
let compare_mode =

src/tools/compiletest/src/lib.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ pub fn parse_config(args: Vec<String>) -> Config {
159159
)
160160
.optflag("", "force-rerun", "rerun tests even if the inputs are unchanged")
161161
.optflag("", "only-modified", "only run tests that result been modified")
162+
// FIXME: Temporarily retained so we can point users to `--no-capture`
162163
.optflag("", "nocapture", "")
164+
.optflag("", "no-capture", "don't capture stdout/stderr of tests")
163165
.optflag("", "profiler-runtime", "is the profiler runtime enabled for this target")
164166
.optflag("h", "help", "show this message")
165167
.reqopt("", "channel", "current Rust channel", "CHANNEL")
@@ -288,6 +290,10 @@ pub fn parse_config(args: Vec<String>) -> Config {
288290
);
289291
})
290292
});
293+
if matches.opt_present("nocapture") {
294+
panic!("`--nocapture` is deprecated; please use `--no-capture`");
295+
}
296+
291297
Config {
292298
bless: matches.opt_present("bless"),
293299
compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
@@ -385,7 +391,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
385391
target_cfgs: OnceLock::new(),
386392
builtin_cfg_names: OnceLock::new(),
387393

388-
nocapture: matches.opt_present("nocapture"),
394+
nocapture: matches.opt_present("no-capture"),
389395

390396
git_repository: matches.opt_str("git-repository").unwrap(),
391397
nightly_branch: matches.opt_str("nightly-branch").unwrap(),

0 commit comments

Comments
 (0)