Skip to content

Add test for --test-builder success path - #148608

Merged
bors merged 4 commits into
rust-lang:mainfrom
osamakader:doc-test-builder
Nov 11, 2025
Merged

Add test for --test-builder success path#148608
bors merged 4 commits into
rust-lang:mainfrom
osamakader:doc-test-builder

Conversation

@osamakader

@osamakaderosamakader commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Fixes#148586

@rustbotrustbot 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
Copy Markdown
Collaborator

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

@rustbot

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Member

r? rustdoc

@rustbotrustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 7, 2025
@GuillaumeGomez

Copy link
Copy Markdown
Member

Much appreciated, thanks!

@bors r+ rollup

@bors

bors commented Nov 7, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 8075c98 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@borsbors 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
Fixesrust-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
Comment threadtests/run-make/rustdoc-test-builder/rmake.rs
@GuillaumeGomez

Copy link
Copy Markdown
Member

Failed in #148642.

I think it should only be run on linux.

@bors r-

@borsbors 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
Copy Markdown
ContributorAuthor

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>
@rust-bors

This comment has been minimized.

@rust-bors

rust-borsBot commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 2aa36fe (2aa36feb4fbf668f3d671c34b7520bdbaf6e6aba, parent: 00426d642ad6a8c6192bf517702a68b0a8001547)

@GuillaumeGomez

Copy link
Copy Markdown
Member

Seems all good.

@bors r+ rollup

@bors

bors commented Nov 10, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit f1bbe59 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@borsbors 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 10, 2025
ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Nov 10, 2025
…llaumeGomez
Add test for --test-builder success path
Fixesrust-lang#148586
ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Nov 10, 2025
…llaumeGomez
Add test for --test-builder success path
Fixesrust-lang#148586
bors added a commit that referenced this pull request Nov 10, 2025
Rollup of 9 pull requests
Successful merges:
- #148480 (Add `Steal::risky_hack_borrow_mut`)
- #148608 (Add test for --test-builder success path)
- #148667 (a few small clippy fixes)
- #148712 (Port `cfg_select!` to the new attribute parsing system)
- #148760 (rustc_target: hide TargetOptions::vendor)
- #148775 (Fix a typo in the documentation for the strict_shr function)
- #148779 (Implement DynSend and DynSync for std::panic::Location.)
- #148781 ([rustdoc] Remove unneeded `allow(rustc::potential_query_instability)`)
- #148791 (fix "is_closure_like" doc comment)
r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 11, 2025
…llaumeGomez
Add test for --test-builder success path
Fixesrust-lang#148586
@ZalatharZalathar mentioned this pull request Nov 11, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 11, 2025
…llaumeGomez
Add test for --test-builder success path
Fixesrust-lang#148586
@ZalatharZalathar mentioned this pull request Nov 11, 2025
bors added a commit that referenced this pull request Nov 11, 2025
Rollup of 16 pull requests
Successful merges:
- #141470 (Add new `function_casts_as_integer` lint)
- #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
- #146495 (rustdoc: Erase `#![doc(document_private_items)]`)
- #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
- #147833 (rustdoc-json: move `target` to `json::conversions`)
- #147952 (Add a timeout to the `remote-test-client` connection)
- #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
- #148480 (Add `Steal::risky_hack_borrow_mut`)
- #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
- #148508 (Provide more context when mutably borrowing an imutably borrowed value)
- #148530 (update the bootstrap readme)
- #148608 (Add test for --test-builder success path)
- #148636 (bootstrap: respect `build.python` on macOS)
- #148639 (test(rustdoc): move tests into jump-to-def)
- #148647 (Check unsafety for non-macro attributes in `validate_attr`)
- #148667 (a few small clippy fixes)
r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Nov 11, 2025
Rollup of 16 pull requests
Successful merges:
- #141470 (Add new `function_casts_as_integer` lint)
- #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
- #146495 (rustdoc: Erase `#![doc(document_private_items)]`)
- #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
- #147833 (rustdoc-json: move `target` to `json::conversions`)
- #147952 (Add a timeout to the `remote-test-client` connection)
- #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
- #148480 (Add `Steal::risky_hack_borrow_mut`)
- #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
- #148508 (Provide more context when mutably borrowing an imutably borrowed value)
- #148530 (update the bootstrap readme)
- #148608 (Add test for --test-builder success path)
- #148636 (bootstrap: respect `build.python` on macOS)
- #148639 (test(rustdoc): move tests into jump-to-def)
- #148647 (Check unsafety for non-macro attributes in `validate_attr`)
- #148667 (a few small clippy fixes)
r? `@ghost`
`@rustbot` modify labels: rollup
@ZalatharZalathar mentioned this pull request Nov 11, 2025
bors added a commit that referenced this pull request Nov 11, 2025
Rollup of 15 pull requests
Successful merges:
- #141470 (Add new `function_casts_as_integer` lint)
- #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
- #146495 (rustdoc: Erase `#![doc(document_private_items)]`)
- #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
- #147833 (rustdoc-json: move `target` to `json::conversions`)
- #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
- #148480 (Add `Steal::risky_hack_borrow_mut`)
- #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
- #148508 (Provide more context when mutably borrowing an imutably borrowed value)
- #148530 (update the bootstrap readme)
- #148608 (Add test for --test-builder success path)
- #148636 (bootstrap: respect `build.python` on macOS)
- #148639 (test(rustdoc): move tests into jump-to-def)
- #148647 (Check unsafety for non-macro attributes in `validate_attr`)
- #148667 (a few small clippy fixes)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 303dd1c into rust-lang:mainNov 11, 2025
12 checks passed
@rustbotrustbot added this to the 1.93.0 milestone Nov 11, 2025
rust-timer added a commit that referenced this pull request Nov 11, 2025
Rollup merge of #148608 - osamakader:doc-test-builder, r=GuillaumeGomez
Add test for --test-builder success path
Fixes#148586
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Nov 12, 2025
Rollup of 15 pull requests
Successful merges:
- rust-lang/rust#141470 (Add new `function_casts_as_integer` lint)
- rust-lang/rust#143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
- rust-lang/rust#146495 (rustdoc: Erase `#![doc(document_private_items)]`)
- rust-lang/rust#147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
- rust-lang/rust#147833 (rustdoc-json: move `target` to `json::conversions`)
- rust-lang/rust#147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
- rust-lang/rust#148480 (Add `Steal::risky_hack_borrow_mut`)
- rust-lang/rust#148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
- rust-lang/rust#148508 (Provide more context when mutably borrowing an imutably borrowed value)
- rust-lang/rust#148530 (update the bootstrap readme)
- rust-lang/rust#148608 (Add test for --test-builder success path)
- rust-lang/rust#148636 (bootstrap: respect `build.python` on macOS)
- rust-lang/rust#148639 (test(rustdoc): move tests into jump-to-def)
- rust-lang/rust#148647 (Check unsafety for non-macro attributes in `validate_attr`)
- rust-lang/rust#148667 (a few small clippy fixes)
r? `@ghost`
`@rustbot` modify labels: rollup
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 13, 2025
…r_sgx, r=GuillaumeGomez
Disable rustdoc-test-builder test partially for SGX target.
The `rustdoc-test-builder` test started to fail after rust-lang#148608 for SGX target. The reason is, sgx binary can not be executed directly so rustdoc fails to execute passed `--test-builder` binary. This PR simply ignores the success part just like it is ignore for `wasm` target.
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 13, 2025
…r_sgx, r=GuillaumeGomez
Disable rustdoc-test-builder test partially for SGX target.
The `rustdoc-test-builder` test started to fail after rust-lang#148608 for SGX target. The reason is, sgx binary can not be executed directly so rustdoc fails to execute passed `--test-builder` binary. This PR simply ignores the success part just like it is ignore for `wasm` target.
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 14, 2025
…r_sgx, r=GuillaumeGomez
Disable rustdoc-test-builder test partially for SGX target.
The `rustdoc-test-builder` test started to fail after rust-lang#148608 for SGX target. The reason is, sgx binary can not be executed directly so rustdoc fails to execute passed `--test-builder` binary. This PR simply ignores the success part just like it is ignore for `wasm` target.
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 14, 2025
…r_sgx, r=GuillaumeGomez
Disable rustdoc-test-builder test partially for SGX target.
The `rustdoc-test-builder` test started to fail after rust-lang#148608 for SGX target. The reason is, sgx binary can not be executed directly so rustdoc fails to execute passed `--test-builder` binary. This PR simply ignores the success part just like it is ignore for `wasm` target.
rust-timer added a commit that referenced this pull request Nov 14, 2025
Rollup merge of #148901 - sardok:disable_rustdoc_test_builder_sgx, r=GuillaumeGomez
Disable rustdoc-test-builder test partially for SGX target.
The `rustdoc-test-builder` test started to fail after #148608 for SGX target. The reason is, sgx binary can not be executed directly so rustdoc fails to execute passed `--test-builder` binary. This PR simply ignores the success part just like it is ignore for `wasm` target.
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
Rollup of 15 pull requests
Successful merges:
- rust-lang/rust#141470 (Add new `function_casts_as_integer` lint)
- rust-lang/rust#143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
- rust-lang/rust#146495 (rustdoc: Erase `#![doc(document_private_items)]`)
- rust-lang/rust#147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
- rust-lang/rust#147833 (rustdoc-json: move `target` to `json::conversions`)
- rust-lang/rust#147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
- rust-lang/rust#148480 (Add `Steal::risky_hack_borrow_mut`)
- rust-lang/rust#148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
- rust-lang/rust#148508 (Provide more context when mutably borrowing an imutably borrowed value)
- rust-lang/rust#148530 (update the bootstrap readme)
- rust-lang/rust#148608 (Add test for --test-builder success path)
- rust-lang/rust#148636 (bootstrap: respect `build.python` on macOS)
- rust-lang/rust#148639 (test(rustdoc): move tests into jump-to-def)
- rust-lang/rust#148647 (Check unsafety for non-macro attributes in `validate_attr`)
- rust-lang/rust#148667 (a few small clippy fixes)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-makeArea: port run-make Makefiles to rmake.rsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant 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

7 participants

@osamakader@rustbot@rust-log-analyzer@jieyouxu@GuillaumeGomez@bors@matthiaskrgr