Skip to content

Commit 03373ee

Browse files
committed
compiletest: Use the new non-libtest executor by default
Currently the new executor can be explicitly disabled by passing the `-N` flag to compiletest (e.g. `./x test ui -- -N`), but eventually that flag will be removed, alongside the removal of the libtest dependency.
1 parent 1f76d21 commit 03373ee

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

Diff for: src/tools/compiletest/src/common.rs

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

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,
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,
422425
}
423426

424427
impl Config {

Diff for: src/tools/compiletest/src/lib.rs

+4-3
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", "new-executor", "enables the new test executor instead of using libtest")
206+
.optflag("N", "no-new-executor", "disables the new test executor, and uses libtest instead")
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-
new_executor: matches.opt_present("new-executor"),
453+
no_new_executor: matches.opt_present("no-new-executor"),
454454
}
455455
}
456456

@@ -577,9 +577,10 @@ 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.new_executor {
580+
let res = if !config.no_new_executor {
581581
Ok(executor::run_tests(&config, tests))
582582
} else {
583+
// FIXME(Zalathar): Eventually remove the libtest executor entirely.
583584
crate::executor::libtest::execute_tests(&config, tests)
584585
};
585586

0 commit comments

Comments
 (0)