about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2024-12-27 12:10:55 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2024-12-27 12:10:55 +0000
commitbccc11e230e247c413ecf0922bde9e3c4b67faeb (patch)
tree4fd6f466e1051cba01b90d0b13923d03080b8035 /src
parent4fd3baaf70fb5b0fe3afc85588b71cf8bee40e91 (diff)
downloadrust-bccc11e230e247c413ecf0922bde9e3c4b67faeb.tar.gz
rust-bccc11e230e247c413ecf0922bde9e3c4b67faeb.zip
compiletest: Replace `--nocapture` with `--no-capture`
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs2
-rw-r--r--src/tools/compiletest/src/lib.rs8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 47b81d2669d..4efc2973776 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -1830,7 +1830,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
         }
 
         if builder.config.cmd.no_capture() {
-            cmd.arg("--nocapture");
+            cmd.arg("--no-capture");
         }
 
         let compare_mode =
diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs
index 250ef0794ad..74d1f5637a8 100644
--- a/src/tools/compiletest/src/lib.rs
+++ b/src/tools/compiletest/src/lib.rs
@@ -159,7 +159,9 @@ pub fn parse_config(args: Vec<String>) -> Config {
         )
         .optflag("", "force-rerun", "rerun tests even if the inputs are unchanged")
         .optflag("", "only-modified", "only run tests that result been modified")
+        // FIXME: Temporarily retained so we can point users to `--no-capture`
         .optflag("", "nocapture", "")
+        .optflag("", "no-capture", "don't capture stdout/stderr of tests")
         .optflag("", "profiler-runtime", "is the profiler runtime enabled for this target")
         .optflag("h", "help", "show this message")
         .reqopt("", "channel", "current Rust channel", "CHANNEL")
@@ -288,6 +290,10 @@ pub fn parse_config(args: Vec<String>) -> Config {
             );
         })
     });
+    if matches.opt_present("nocapture") {
+        panic!("`--nocapture` is deprecated; please use `--no-capture`");
+    }
+
     Config {
         bless: matches.opt_present("bless"),
         compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
@@ -385,7 +391,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
         target_cfgs: OnceLock::new(),
         builtin_cfg_names: OnceLock::new(),
 
-        nocapture: matches.opt_present("nocapture"),
+        nocapture: matches.opt_present("no-capture"),
 
         git_repository: matches.opt_str("git-repository").unwrap(),
         nightly_branch: matches.opt_str("nightly-branch").unwrap(),