about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-25 06:00:11 +0000
committerbors <bors@rust-lang.org>2025-04-25 06:00:11 +0000
commit862156d6f25ccb0d915d2a0c8ebab520d05e4f72 (patch)
tree7837dff6592b79e932ebd71fb2c4f3242f95ee61 /src/tools
parent847e3ee6b0e614937eee4e6d8f61094411eadcc0 (diff)
parentd0a458040cf6d41350f24134c418a6e4a7df4498 (diff)
downloadrust-862156d6f25ccb0d915d2a0c8ebab520d05e4f72.tar.gz
rust-862156d6f25ccb0d915d2a0c8ebab520d05e4f72.zip
Auto merge of #140233 - Zalathar:revert-new-executor, r=jieyouxu
Revert compiletest new-executor, to re-land without download-rustc

Revert <https://github.com/rust-lang/rust/pull/139998> because the original merge triggered download-rustc, which messes with test metrics and prevents us from properly comparing them before/after the change.

The plan is to re-land this PR as-is, combined with a trivial compiler change to avoid download-rustc and get proper test metrics for comparison.

This reverts commit be181dd75c83d72fcc95538e235768bc367b76b9, reversing changes made to 645d0ad2a4f145ae576e442ec5c73c0f8eed829b.

r? ghost
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/compiletest/src/common.rs11
-rw-r--r--src/tools/compiletest/src/lib.rs7
2 files changed, 7 insertions, 11 deletions
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index e0132056d6c..b5bbe70c48c 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -414,13 +414,10 @@ pub struct Config {
     /// ABI tests.
     pub minicore_path: Utf8PathBuf,
 
-    /// If true, disable the "new" executor, and use the older libtest-based
-    /// executor to run tests instead. This is a temporary fallback, to make
-    /// manual comparative testing easier if bugs are found in the new executor.
-    ///
-    /// FIXME(Zalathar): Eventually remove this flag and remove the libtest
-    /// dependency.
-    pub no_new_executor: bool,
+    /// If true, run tests with the "new" executor that was written to replace
+    /// compiletest's dependency on libtest. Eventually this will become the
+    /// default, and the libtest dependency will be removed.
+    pub new_executor: bool,
 }
 
 impl Config {
diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs
index 0a3888a7d50..3cf13671ef0 100644
--- a/src/tools/compiletest/src/lib.rs
+++ b/src/tools/compiletest/src/lib.rs
@@ -202,7 +202,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
             "COMMAND",
         )
         .reqopt("", "minicore-path", "path to minicore aux library", "PATH")
-        .optflag("N", "no-new-executor", "disables the new test executor, and uses libtest instead")
+        .optflag("n", "new-executor", "enables the new test executor instead of using libtest")
         .optopt(
             "",
             "debugger",
@@ -448,7 +448,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
 
         minicore_path: opt_path(matches, "minicore-path"),
 
-        no_new_executor: matches.opt_present("no-new-executor"),
+        new_executor: matches.opt_present("new-executor"),
     }
 }
 
@@ -575,10 +575,9 @@ pub fn run_tests(config: Arc<Config>) {
     // Delegate to the executor to filter and run the big list of test structures
     // created during test discovery. When the executor decides to run a test,
     // it will return control to the rest of compiletest by calling `runtest::run`.
-    let res = if !config.no_new_executor {
+    let res = if config.new_executor {
         Ok(executor::run_tests(&config, tests))
     } else {
-        // FIXME(Zalathar): Eventually remove the libtest executor entirely.
         crate::executor::libtest::execute_tests(&config, tests)
     };