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

Rust test suite has too many files in one directory #20796

Closed
sanxiyn opened this issue Jan 9, 2015 · 5 comments
Closed

Rust test suite has too many files in one directory #20796

sanxiyn opened this issue Jan 9, 2015 · 5 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc

Comments

@sanxiyn
Copy link
Member

sanxiyn commented Jan 9, 2015

This causes warnings in GitHub code browser. Browsing src/test/run-pass warns "Sorry, we had to truncate this directory to 1,000 files. 862 entries were omitted from the list."

@kmcallister
Copy link
Contributor

They are still findable through GitHub's file finder (press t on the main repo page). I don't think browsing the enormous list online is a compelling use case to justify complicating our directory layout.

@steveklabnik
Copy link
Member

/cc @rust-lang/compiler , is this a bug we'd like to fix? if so, how should this be organized?

@eddyb
Copy link
Member

eddyb commented Mar 11, 2016

@steveklabnik AFAIK, @nikomatsakis has been working on turning the test directories into trees.

@nikomatsakis
Copy link
Contributor

We now have the capability to fix it, yes, but I'm not yet sure of the optimal organization. Having subdirectories is good but I've often found also that there are tests which span categories. Using foo-bar-baz names allowed me to handle that by having both categories in the name. Nonetheless, it seems obvious that we could start by making directories for the existing groupings, like regions-* or whatever.

Longer term I have a strong desire to have things organized such that we can easily answer the question "is there a test covering this scenario"? As far as I am concerned, our test-base right now is effectively "write only". This is however a very challenging problem -- and not one we will be to answer with just file names and directory conventions.

Anyway, a couple of thoughts:

  1. I think it is generally speaking wrong to have test structure match the compiler's structure. That is, I wouldn't want to have to move tests around just because we made a new crate or something.
  2. But having directories for "major passes" in the compiler makes sense to me (privacyck, typeck, borrowck, etc).
  3. We should probably move all the issue-123 tests into a regression directory.
  4. Only mildly related, but I'd like to merge run-pass and compile-fail into one concept someday. :)

@alexcrichton
Copy link
Member

I believe compiletest has since been refactored to support subdirectories, so now this is just a PR away from trimming down the number of tests! Since this doesn't seem to actively be causing problems, though, I'm going to close.

@sanxiyn sanxiyn added A-testsuite Area: The testsuite used to check the correctness of rustc and removed A-build labels Jun 20, 2017
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
Projects
None yet
Development

No branches or pull requests

7 participants