Skip to content

Commit 93fb0ed

Browse files
committed
Auto merge of rust-lang#140233 - Zalathar:revert-new-executor, r=jieyouxu
Revert compiletest new-executor, to re-land without download-rustc Revert <rust-lang#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 be181dd, reversing changes made to 645d0ad. r? ghost
2 parents 3c877f6 + d0a4580 commit 93fb0ed

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/tools/compiletest/src/common.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,10 @@ pub struct Config {
415415
/// ABI tests.
416416
pub minicore_path: Utf8PathBuf,
417417

418-
/// If true, disable the "new" executor, and use the older libtest-based
419-
/// executor to run tests instead. This is a temporary fallback, to make
420-
/// manual comparative testing easier if bugs are found in the new executor.
421-
///
422-
/// FIXME(Zalathar): Eventually remove this flag and remove the libtest
423-
/// dependency.
424-
pub no_new_executor: bool,
418+
/// If true, run tests with the "new" executor that was written to replace
419+
/// compiletest's dependency on libtest. Eventually this will become the
420+
/// default, and the libtest dependency will be removed.
421+
pub new_executor: bool,
425422
}
426423

427424
impl Config {

src/tools/compiletest/src/lib.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
203203
"COMMAND",
204204
)
205205
.reqopt("", "minicore-path", "path to minicore aux library", "PATH")
206-
.optflag("N", "no-new-executor", "disables the new test executor, and uses libtest instead")
206+
.optflag("n", "new-executor", "enables the new test executor instead of using libtest")
207207
.optopt(
208208
"",
209209
"debugger",
@@ -450,7 +450,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
450450

451451
minicore_path: opt_path(matches, "minicore-path"),
452452

453-
no_new_executor: matches.opt_present("no-new-executor"),
453+
new_executor: matches.opt_present("new-executor"),
454454
}
455455
}
456456

@@ -577,10 +577,9 @@ pub fn run_tests(config: Arc<Config>) {
577577
// Delegate to the executor to filter and run the big list of test structures
578578
// created during test discovery. When the executor decides to run a test,
579579
// it will return control to the rest of compiletest by calling `runtest::run`.
580-
let res = if !config.no_new_executor {
580+
let res = if config.new_executor {
581581
Ok(executor::run_tests(&config, tests))
582582
} else {
583-
// FIXME(Zalathar): Eventually remove the libtest executor entirely.
584583
crate::executor::libtest::execute_tests(&config, tests)
585584
};
586585

0 commit comments

Comments
 (0)