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

Test tidy should not count untracked paths towards entries limit #103958

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Nov 4, 2022

Fixes #103951
r? @jyn514

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-testsuite Area: The testsuite used to check the correctness of rustc labels Nov 4, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2022

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@Noratrieb
Copy link
Member

What's the perf impact of this? Could you run time x test tidy before and after on your machine?

@chenyukang
Copy link
Member Author

@Nilstrieb

Old:

cat@oops:~/rust$ hyperfine --runs 5 'x test tidy'
Benchmark 1: x test tidy
  Time (mean ± σ):      8.154 s ±  1.040 s    [User: 24.769 s, System: 3.725 s]
  Range (min … max):    7.140 s …  9.679 s    5 runs

New:

cat@oops:~/rust$ hyperfine --runs 5 'x test tidy'
Benchmark 1: x test tidy
  Time (mean ± σ):      8.185 s ±  1.048 s    [User: 26.050 s, System: 4.057 s]
  Range (min … max):    7.370 s …  9.952 s    5 runs

@Noratrieb
Copy link
Member

Thanks, that looks great!

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

Thanks! I'm surprised how simple this is, nice work :) have you tested locally that it ignores untracked files in src/test/ui?

src/tools/tidy/src/ui_tests.rs Outdated Show resolved Hide resolved
@chenyukang
Copy link
Member Author

Thanks! I'm surprised how simple this is, nice work :) have you tested locally that it ignores untracked files in src/test/ui?

Yes, I tested it locally.
I'm curious how this crate find out the .gitignore, it will find all the parents of a file/dir,
https://github.com/BurntSushi/ripgrep/blob/000015791742bb1280f1853adb714fdee1ba9f8e/crates/ignore/src/dir.rs#L195

add path: "/home/cat/rust/.gitignore"
dir_for_ignorefile: "/home/cat/rust/.git"
add path: "/home/cat/rust/.git/info/exclude"
dir_for_ignorefile: "/home/cat/rust/src"
dir_for_ignorefile: "/home/cat/rust/src"
dir_for_ignorefile: "/home/cat/rust/src/.git"
dir_for_ignorefile: "/home/cat/rust/src/test"
dir_for_ignorefile: "/home/cat/rust/src/test"
dir_for_ignorefile: "/home/cat/rust/src/test/.git"
dir_for_ignorefile: "/home/cat/rust/src/test/ui"
dir_for_ignorefile: "/home/cat/rust/src/test/ui"

But the performance seems OK.

@jyn514
Copy link
Member

jyn514 commented Nov 4, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Nov 4, 2022

📌 Commit 18511ba has been approved by jyn514

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 4, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 4, 2022
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#103367 (Remove std's transitive dependency on cfg-if 0.1)
 - rust-lang#103397 (Port `dead_code` lints to be translatable.)
 - rust-lang#103681 (libtest: run all tests in their own thread, if supported by the host)
 - rust-lang#103792 (Migrate `codegen_ssa` to diagnostics structs - [Part 2])
 - rust-lang#103897 (asm: Work around LLVM bug on AArch64)
 - rust-lang#103937 (minor changes to make method lookup diagnostic code easier to read)
 - rust-lang#103958 (Test tidy should not count untracked paths towards entries limit)
 - rust-lang#103964 (Give a specific lint for unsafety not being inherited)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 82d7de8 into rust-lang:master Nov 4, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 4, 2022
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

./x.py test tidy should not count untracked paths towards entries limit
5 participants