Add test for --test-builder success path by osamakader · Pull Request #148608 · rust-lang/rust
rustbot
added
A-run-make
labels
Nov 6, 2025Adds 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>
label
Nov 7, 2025
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Nov 7, 2025bors added a commit that referenced this pull request
Nov 7, 2025Rollup 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
bors
added
S-waiting-on-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, 2025rust-bors bot added a commit that referenced this pull request
Nov 10, 2025
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Nov 10, 2025bors added a commit that referenced this pull request
Nov 10, 2025Rollup 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
bors added a commit that referenced this pull request
Nov 11, 2025Rollup 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, 2025Rollup 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, 2025Rollup 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
rust-timer added a commit that referenced this pull request
Nov 11, 2025GuillaumeGomez 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, 2025Rollup 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters