Skip to content
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

Set doc-tests to no_run #11699

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Set doc-tests to no_run #11699

merged 2 commits into from
Oct 23, 2023

Conversation

Alexendoo
Copy link
Member

This excludes should_panic tests, those are still run to ensure they panic. Most of our other doc snippets don't gain much from being run though so this frees up a nice bit of CI time

It also fixes the occasional issue such as foo.txts being created

/// let f = File::create("foo.txt").unwrap();

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Oct 23, 2023

r? @llogiq

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 23, 2023
@llogiq
Copy link
Contributor

llogiq commented Oct 23, 2023

I wonder if it wouldn't be better to either use rust,ignore or just change CI to only run --lib tests, as both would still allow us to run the doctests manually if we so desire without changing a lot of lines.

@Alexendoo
Copy link
Member Author

Alexendoo commented Oct 23, 2023

I think we should still be checking that the examples compile in CI, ignored is used for doc snippets that would not compile, so manually running ignored tests is not going to result in a lot of errors

@llogiq
Copy link
Contributor

llogiq commented Oct 23, 2023

Ah, yes, we want to compile but not necessarily run the tests. That makes sense.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 23, 2023

📌 Commit ea34aae has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 23, 2023

⌛ Testing commit ea34aae with merge 6678af9...

bors added a commit that referenced this pull request Oct 23, 2023
Set doc-tests to `no_run`

This excludes `should_panic` tests, those are still run to ensure they panic. Most of our other doc snippets don't gain much from being run though so this frees up a nice bit of CI time

It also fixes the occasional issue such as `foo.txt`s being created https://github.com/rust-lang/rust-clippy/blob/f942470ca774b9648bac042f5d4c4ec74b81b61a/clippy_lints/src/permissions_set_readonly_false.rs#L19

changelog: none
@bors
Copy link
Contributor

bors commented Oct 23, 2023

💔 Test failed - checks-action_test

@llogiq
Copy link
Contributor

llogiq commented Oct 23, 2023

For some reason the collect_metadata check failed.

@Alexendoo
Copy link
Member Author

Ah, there were a couple code blocks that got copied to book/src/lint_configuration.md

@llogiq
Copy link
Contributor

llogiq commented Oct 23, 2023

Ok, let's try again.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 23, 2023

📌 Commit 7347c18 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 23, 2023

⌛ Testing commit 7347c18 with merge 033c763...

@bors
Copy link
Contributor

bors commented Oct 23, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 033c763 to master...

@bors bors merged commit 033c763 into rust-lang:master Oct 23, 2023
7 checks passed
@Alexendoo Alexendoo deleted the no-run-doctests branch October 23, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants