Skip to content

Conversation

@osamakader
Copy link
Contributor

@osamakader osamakader commented Nov 6, 2025

Fixes #148586

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 6, 2025

jieyouxu is currently at their maximum review capacity.
They may take a while to respond.

@rustbot
Copy link
Collaborator

rustbot commented Nov 6, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Adds missing test coverage for rustdoc's `--test-builder` option.

The existing test only covered the error case (non-executable builder). This PR
adds:
- A custom test builder that logs arguments and forwards to rustc
- A test verifying that `--test-builder` successfully invokes the custom
builder with rustc-style arguments
- Improved comments explaining both the error and success test scenarios

The test validates that custom builders can properly intercept and handle
doctest compilation.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
@jieyouxu
Copy link
Member

jieyouxu commented Nov 7, 2025

r? rustdoc

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 7, 2025
@rustbot rustbot assigned GuillaumeGomez and unassigned jieyouxu Nov 7, 2025
@GuillaumeGomez
Copy link
Member

Much appreciated, thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 7, 2025

📌 Commit 8075c98 has been approved by GuillaumeGomez

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 Nov 7, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 7, 2025
…llaumeGomez

Add test for --test-builder success path

Fixes rust-lang#148586
bors added a commit that referenced this pull request Nov 7, 2025
Rollup of 5 pull requests

Successful merges:

 - #145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro)
 - #148204 (Modify contributor email entries in .mailmap)
 - #148556 (Fix suggestion for returning async closures)
 - #148585 ([rustdoc] Replace `print` methods with functions to improve code readability)
 - #148608 (Add test for --test-builder success path)

r? `@ghost`
`@rustbot` modify labels: rollup
@GuillaumeGomez
Copy link
Member

Failed in #148642.

I think it should only be run on linux.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 7, 2025
@osamakader
Copy link
Contributor Author

I'm trying right now to use bare_rustc so we compile for the host architecture even in cross build.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 7, 2025
@GuillaumeGomez
Copy link
Member

Let's confirm your fix works.

@bors try jobs=test-various

rust-bors bot added a commit that referenced this pull request Nov 8, 2025
Add test for --test-builder success path

try-job: test-various
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Nov 8, 2025

💔 Test for 1410cf9 failed: CI. Failed jobs:

@osamakader
Copy link
Contributor Author

@bors try jobs=test-various

@rust-bors
Copy link

rust-bors bot commented Nov 8, 2025

@osamakader: 🔑 Insufficient privileges: not in try users

@osamakader
Copy link
Contributor Author

@GuillaumeGomez Can you please re-trigger the test? I don't have privileges to do so.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

Need to fix the new issue before that. 😉

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
@osamakader
Copy link
Contributor Author

@GuillaumeGomez Can you please re-try? thanks.

@GuillaumeGomez
Copy link
Member

Here we go!

@bors try jobs=test-various

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 8, 2025
Add test for --test-builder success path

try-job: test-various
@rust-bors
Copy link

rust-bors bot commented Nov 8, 2025

☀️ Try build successful (CI)
Build commit: 7eefd77 (7eefd7758b1de3920d206290ad79e7f8d3e7d4bb, parent: fb23dd3c6b120f0d2e55e5f2c69a464df7b35fdf)

@GuillaumeGomez
Copy link
Member

Seems like we're all good. Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 9, 2025

📌 Commit 1c1923f has been approved by GuillaumeGomez

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 Nov 9, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 9, 2025
…llaumeGomez

Add test for --test-builder success path

Fixes rust-lang#148586
Comment on lines +26 to +31
// Some targets (for example wasm) cannot execute doctests directly even with a runner,
// so only exercise the success path when the target can run on the host.
let target = std::env::var("TARGET").expect("TARGET must be set");
if target.contains("wasm") {
return;
}
Copy link
Member

@jieyouxu jieyouxu Nov 9, 2025

Choose a reason for hiding this comment

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

Suggestion: sorry I didn't look at this, but this should instead use //@ ignore-wasm or //@ ignore-cross-compile (if this is host-only), otherwise this will show as test pass on WASM but in reality nothing is checked. Since this is in a rollup, it can be done as a follow-up.

(Also, there is a run_make_support::target() helper for what you're doing here.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @jieyouxu. I’d actually prefer to keep the test running on wasm: the failing-path check (non-executable builder should error without panicking) still runs there, so the test isn’t a no-op even after we skip the success branch. I’ll switch the guard to use run_make_support::target() for clarity in a followup PR.

bors added a commit that referenced this pull request Nov 9, 2025
Rollup of 10 pull requests

Successful merges:

 - #148608 (Add test for --test-builder success path)
 - #148683 (Remove `#[const_trait]`)
 - #148687 (std: use a non-poisoning `RwLock` for the panic hook)
 - #148709 (fix: disable self-contained linker when bootstrap-override-lld is set)
 - #148716 (mgca: Finish implementation of `#[type_const]`)
 - #148722 (Add Crystal Durham to .mailmap)
 - #148723 (bootstrap: Render doctest timing reports as text, not JSON)
 - #148724 (tidy: Don't bypass stderr output capture in unit tests)
 - #148734 (miri subtree update)
 - #148736 (Fix typo in unstable-book link)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rustdoc] Missing test for --test-builder option

6 participants