Skip to content

nested aux-build in tests/rustdoc/ tests - #128161

Merged
bors merged 6 commits into
rust-lang:masterfrom
EtomicBomb:just-compiletest
Aug 3, 2024
Merged

bors merged 6 commits into
rust-lang:masterfrom
EtomicBomb:just-compiletest

Conversation

@EtomicBomb

@EtomicBomb EtomicBomb commented Jul 24, 2024 •

Copy link
Copy Markdown
Contributor
  • Fixes bug that prevented using nested aux-build in tests/rustdoc/ tests. Before, fn document and the auxiliary builder disagreed about where to find the nested aux-build source file (auxiliary/auxiliary/aux.rs vs auxiliary/aux.rs), preventing them from building. Picked the latter in line with other builders in compiletest.
  • Adds //@ doc-flags header, which forwards flags to rustdoc and not rustc.
  • Adds //@ unique-doc-out-dir header, which sets the --out-dir for the rustdoc invocation to a unique directory: <root out dir>/docs/<test name>/doc
  • Changes working directory of the rustdoc invocation to the root out directory (common among all aux-builds). Prior art: exec_compiled_test in runtest.rs
  • Adds tests that use nested aux builds and new headers

These changes provide useful capabilities for writing rustdoc tests on their own. They are also needed to test the implementation for the mergable-rustdoc-cross-crate-info RFC.

try-job: x86_64-msvc

@rustbot

rustbot commented Jul 24, 2024

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @compiler-errors (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added 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) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 24, 2024
@rustbot

rustbot commented Jul 24, 2024

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 24, 2024
@rustbot

This comment was marked as resolved.

@rust-log-analyzer

This comment has been minimized.

@compiler-errors

Copy link
Copy Markdown
Contributor

This PR's history should be cleaned quite a lot, at least rebasing out all of the merge commits but also probably the useless commits that represent intermediate work states like "code from this morning".

r? rustdoc

@rust-log-analyzer

This comment has been minimized.

@EtomicBomb

Copy link
Copy Markdown
Contributor Author

Rebased the history! This is my first PR, so I'm just learning the ropes!

@notriddle notriddle removed the has-merge-commits PR has merge commits, merge with caution. label Jul 25, 2024

@notriddle notriddle left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AFAICT, this seems fine. In particular, I love these test cases!

I'm not as familiar with the deep guts of compiletest, though.

CC @jieyouxu

Comment thread src/tools/compiletest/src/runtest.rs Resolved
Comment thread src/tools/compiletest/src/runtest.rs Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for including a negative test here! 👍

Those things aren't common enough, and they should be.

@jieyouxu jieyouxu self-assigned this Jul 25, 2024
@jieyouxu

Copy link
Copy Markdown
Member

I'm not as familiar with the deep guts of compiletest, though.

CC @jieyouxu

I'll try to take a look tomorrow for the compiletest changes.

@bors

ghost commented Jul 29, 2024

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #125443) made this pull request unmergeable. Please resolve the merge conflicts.

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry for the wait, I just got to this PR today. The compiletest changes LGTM for the most part, just a question about potential test revision interactions.

Comment thread src/tools/compiletest/src/runtest.rs Resolved
@jieyouxu jieyouxu removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 29, 2024
@tmandry

ghost commented Aug 1, 2024

Copy link
Copy Markdown
Member

@bors r=notriddle

@bors

ghost commented Aug 1, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit bd23e0e has been approved by notriddle

It is now in the queue for this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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) 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.

8 participants