Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 43e62a7

Browse files
committed
Auto merge of #140288 - Zalathar:new-executor, r=jieyouxu
compiletest: Re-land using the new non-libtest executor by default This PR re-lands #139998, which had the misfortune of triggering download-rustc in its CI jobs, so we didn't get proper test metrics for comparison with the old implementation. So that was PR was reverted in #140233, with the intention of re-landing it alongside a dummy compiler change to inhibit download-rustc. --- Original PR description for #139998: >The new executor was implemented in #139660, but required a manual opt-in. This PR activates the new executor by default, but leaves the old libtest-based executor in place (temporarily) to make reverting easier if something unexpectedly goes horribly wrong. > >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. The flag is mostly there to make manual comparative testing easier if something does go wrong. > >As before, there *should* be no user-visible difference between the old executor and the new executor. --- r? jieyouxu
2 parents 10fa3c4 + 1670de4 commit 43e62a7

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

‎compiler/rustc_mir_transform/src/coverage/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn instrument_function_for_coverage<'tcx>(tcx: TyCtxt<'tcx>, mir_body: &mut mir:
8989

9090
// Use the coverage graph to prepare intermediate data that will eventually
9191
// be used to assign physical counters and counter expressions to points in
92-
// the control-flow graph
92+
// the control-flow graph.
9393
let BcbCountersData { node_flow_data, priority_list } =
9494
counters::prepare_bcb_counters_data(&graph);
9595

‎src/tools/compiletest/src/common.rs‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,13 @@ pub struct Config {
414414
/// ABI tests.
415415
pub minicore_path: Utf8PathBuf,
416416

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

423426
impl Config {

‎src/tools/compiletest/src/lib.rs‎

Lines changed: 4 additions & 3 deletions
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",
@@ -449,7 +449,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
449449

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

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

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /