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

Split the corpus tests into smaller tests #14367

Merged
merged 1 commit into from
Nov 16, 2024
Merged

Conversation

MichaReiser
Copy link
Member

Summary

This PR splits the corpus tests into smaller chunks because running all of them takes 8s on my windows machine and it's by far the longest test in red_knot_workspace.

Splitting the tests has the advantage that they run in parallel. This PR brings down the wall time from 8s to 4s.

This PR also limits the glob for the linter tests because it's common to clone cpython into the ruff_linter/resources/test folder for benchmarks (because that's what's written in the contributing guides)

Test Plan

cargo test

@MichaReiser MichaReiser added testing Related to testing Ruff itself red-knot Multi-file analysis & type inference labels Nov 15, 2024
@MichaReiser MichaReiser changed the title Split the corpus tests Split the corpus tests into smaller tests Nov 15, 2024
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Contributor

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

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

Thank you!

@sharkdp sharkdp merged commit 5be90c3 into main Nov 16, 2024
20 checks passed
@sharkdp sharkdp deleted the micha/split-corpus-tests branch November 16, 2024 19:29
dylwil3 pushed a commit to dylwil3/ruff that referenced this pull request Nov 17, 2024
## Summary

This PR splits the corpus tests into smaller chunks because running all
of them takes 8s on my windows machine and it's by far the longest test
in `red_knot_workspace`.

Splitting the tests has the advantage that they run in parallel. This PR
brings down the wall time from 8s to 4s.

This PR also limits the glob for the linter tests because it's common to
clone cpython into the `ruff_linter/resources/test` folder for
benchmarks (because that's what's written in the contributing guides)

## Test Plan

`cargo test`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference testing Related to testing Ruff itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants