Skip to content

Conversation

@Zalathar
Copy link
Contributor

The current code structure was heavily influenced by wanting to match the libtest executor as closely as possible.

Now that the libtest executor has been removed, we can get rid of some complexity that no longer serves a purpose in the new executor.


The renaming of ShouldPanic is only semi-related, but I included it here because it's small, and as a separate PR it would have conflicted with this one.

r? jieyouxu

This function doesn't need its own clone of the `Arc`, and can just take a
reference instead.
The old name was a holdover from libtest, but in compiletest we only use it for
`//@ should-fail` tests, which are tests of compiletest itself.
@rustbot
Copy link
Collaborator

rustbot commented Oct 25, 2025

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 25, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice cleanups

View changes since this review

Comment on lines +149 to +151
// FIXME(Zalathar): Ideally we would report test failures with `Result`,
// and use panics only for bugs within compiletest itself, but that would
// require a major overhaul of error handling in the test runners.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 25, 2025

📌 Commit bb20367 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 25, 2025
bors added a commit that referenced this pull request Oct 25, 2025
Rollup of 4 pull requests

Successful merges:

 - #143361 (Stop passing resolver disambiguator state to AST lowering.)
 - #148000 (Improvements to attribute suggestions)
 - #148007 (chore: Update to the latest annotate-snippets)
 - #148088 (compiletest: Simplify passing arguments to spawned test threads)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Oct 25, 2025
Rollup of 4 pull requests

Successful merges:

 - #143361 (Stop passing resolver disambiguator state to AST lowering.)
 - #148000 (Improvements to attribute suggestions)
 - #148007 (chore: Update to the latest annotate-snippets)
 - #148088 (compiletest: Simplify passing arguments to spawned test threads)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d4f0f35 into rust-lang:master Oct 25, 2025
11 checks passed
rust-timer added a commit that referenced this pull request Oct 25, 2025
Rollup merge of #148088 - Zalathar:test-thread, r=jieyouxu

compiletest: Simplify passing arguments to spawned test threads

The current code structure was heavily influenced by wanting to match the libtest executor as closely as possible.

Now that the libtest executor has been removed, we can get rid of some complexity that no longer serves a purpose in the new executor.

---

The renaming of `ShouldPanic` is only semi-related, but I included it here because it's small, and as a separate PR it would have conflicted with this one.

r? jieyouxu
@rustbot rustbot added this to the 1.93.0 milestone Oct 25, 2025
@Zalathar Zalathar deleted the test-thread branch October 25, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants