-
Notifications
You must be signed in to change notification settings - Fork 14k
Add test for --test-builder success path #148608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
This comment has been minimized.
This comment has been minimized.
97b721d to
a95ac0c
Compare
This comment has been minimized.
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>
a95ac0c to
8075c98
Compare
|
r? rustdoc |
|
Much appreciated, thanks! @bors r+ rollup |
…llaumeGomez Add test for --test-builder success path Fixes rust-lang#148586
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
|
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>
|
Let's confirm your fix works. @bors try jobs=test-various |
Add test for --test-builder success path try-job: test-various
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 1410cf9 failed: CI. Failed jobs:
|
|
@bors try jobs=test-various |
|
@osamakader: 🔑 Insufficient privileges: not in try users |
|
@GuillaumeGomez Can you please re-trigger the test? I don't have privileges to do so. |
This comment has been minimized.
This comment has been minimized.
|
Need to fix the new issue before that. 😉 |
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
ab29338 to
1c1923f
Compare
|
@GuillaumeGomez Can you please re-try? thanks. |
|
Here we go! @bors try jobs=test-various |
This comment has been minimized.
This comment has been minimized.
Add test for --test-builder success path try-job: test-various
|
Seems like we're all good. Thanks! @bors r+ rollup |
…llaumeGomez Add test for --test-builder success path Fixes rust-lang#148586
| // 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; | ||
| } |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
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
Fixes #148586