Skip to content

Commit 862156d

Browse files
committed
Auto merge of #140233 - Zalathar:revert-new-executor, r=jieyouxu
Revert compiletest new-executor, to re-land without download-rustc Revert <#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 847e3ee + d0a4580 commit 862156d

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
@@ -414,13 +414,10 @@ pub struct Config {
414414
/// ABI tests.
415415
pub minicore_path: Utf8PathBuf,
416416

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

426423
impl Config {

src/tools/compiletest/src/lib.rs

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

449449
minicore_path: opt_path(matches, "minicore-path"),
450450

451-
no_new_executor: matches.opt_present("no-new-executor"),
451+
new_executor: matches.opt_present("new-executor"),
452452
}
453453
}
454454

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

0 commit comments

Comments
 (0)