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

Move auxiliary directories to live with the tests #33228

Merged
merged 10 commits into from
May 7, 2016

Conversation

nikomatsakis
Copy link
Contributor

This is a step for enabling testing of cross-crate incremental compilation. The idea is that instead of having a central auxiliary directory, when you have a // aux-build:foo.rs annotation in the test run-pass/bar.rs, it will look in (e.g.) run-pass/aux/foo.rs. In general, it looks for an aux directory in the same directory as the test. We also ignore the aux directories when enumerating the set of tests.

As part of this PR, also refactor runtest.rs to use methods on a context, which means we can stop passing around context everywhere.

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r+ 8740059ca7d46d160089b98bab6967d6460a663a

@alexcrichton
Copy link
Member

🏂

@bors
Copy link
Contributor

bors commented Apr 27, 2016

⌛ Testing commit 8740059 with merge 1fa6d87...

@bors
Copy link
Contributor

bors commented Apr 27, 2016

💔 Test failed - auto-linux-64-opt-rustbuild

@nikomatsakis
Copy link
Contributor Author

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Apr 27, 2016

📌 Commit c9266e3 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Apr 27, 2016

⌛ Testing commit c9266e3 with merge cc14095...

@bors
Copy link
Contributor

bors commented Apr 27, 2016

⛄ The build was interrupted to prioritize another pull request.

@nikomatsakis
Copy link
Contributor Author

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Apr 27, 2016

📌 Commit 814e394 has been approved by alexcrichton

@nikomatsakis
Copy link
Contributor Author

(confusing why that rustdoc error occurs on travis; I didn't see it locally)

@bors
Copy link
Contributor

bors commented Apr 29, 2016

⌛ Testing commit 814e394 with merge 615ee3e...

@bors
Copy link
Contributor

bors commented Apr 29, 2016

💔 Test failed - auto-win-gnu-32-opt-rustbuild

@bors
Copy link
Contributor

bors commented Apr 29, 2016

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

@nikomatsakis
Copy link
Contributor Author

Rebased. I'm not sure what happened with that failure though, seems odd.

@nikomatsakis nikomatsakis force-pushed the compiletest-gut branch 2 times, most recently from 6f12e6a to 356dc61 Compare May 5, 2016 00:14
@nikomatsakis
Copy link
Contributor Author

@bors r=acrichto

@bors
Copy link
Contributor

bors commented May 5, 2016

📌 Commit 356dc61 has been approved by acrichto

@bors
Copy link
Contributor

bors commented May 5, 2016

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

@nikomatsakis
Copy link
Contributor Author

@bors r=acrichto

@bors
Copy link
Contributor

bors commented May 5, 2016

📌 Commit 48d4f33 has been approved by acrichto

@nikomatsakis
Copy link
Contributor Author

@bors r-

@bors
Copy link
Contributor

bors commented May 5, 2016

📌 Commit 81aa274 has been approved by acrichto

@bors
Copy link
Contributor

bors commented May 6, 2016

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

Also, promote the for loop iterating over revisions out into the
top-level method, whereas before it was pushed down instead each test's
method. Not entirely clear that this was the right call.
Instead of finding aux-build files in `auxiliary`, we now search for an
`aux` directory relative to the test. So if your test is
`compile-fail/foo.rs`, we would look in `compile-fail/aux`.  Similarly,
we ignore the `aux` directory when searching for tets.
For legacy reasons (presumably), Windows does not permit files name aux.
@nikomatsakis
Copy link
Contributor Author

@bors r=acrichto

@bors
Copy link
Contributor

bors commented May 6, 2016

📌 Commit 7070124 has been approved by acrichto

@bors
Copy link
Contributor

bors commented May 6, 2016

⌛ Testing commit 7070124 with merge 62e2b2f...

bors added a commit that referenced this pull request May 6, 2016
Move auxiliary directories to live with the tests

This is a step for enabling testing of cross-crate incremental compilation. The idea is that instead of having a central auxiliary directory, when you have a `// aux-build:foo.rs` annotation in the test `run-pass/bar.rs`, it will look in (e.g.) `run-pass/aux/foo.rs`. In general, it looks for an `aux` directory in the same directory as the test. We also ignore the `aux` directories when enumerating the set of tests.

As part of this PR, also refactor `runtest.rs` to use methods on a context, which means we can stop passing around context everywhere.

r? @alexcrichton
@bors bors merged commit 7070124 into rust-lang:master May 7, 2016
bors added a commit that referenced this pull request May 18, 2016
track incr. comp. dependencies across crates

This PR refactors the compiler's incremental compilation hashing so that it can track dependencies across crates. The main bits are:

- computing a hash representing the metadata for an item we are emitting
  - we do this by making `MetaData(X)` be the current task while computing metadata for an item
  - this naturally registers reads from any tables and things that we read for that purpose
  - we can then hash all the inputs to those tables
- tracking when we access metadata
  - we do this by registering a read of `MetaData(X)` for each foreign item `X` whose metadata we read
- hashing metadata from foreign items
  - we do this by loading up metadata from a file in the incr. comp. directory
  - if there is no file, we use the SVH for the entire crate

There is one very simple test only at this point. The next PR will be focused on expanding out the tests.

Note that this is based on top of #33228

r? @michaelwoerister
@nikomatsakis nikomatsakis deleted the compiletest-gut branch October 3, 2016 14:55
critiqjo pushed a commit to critiqjo/rustdoc that referenced this pull request Dec 16, 2016
track incr. comp. dependencies across crates

This PR refactors the compiler's incremental compilation hashing so that it can track dependencies across crates. The main bits are:

- computing a hash representing the metadata for an item we are emitting
  - we do this by making `MetaData(X)` be the current task while computing metadata for an item
  - this naturally registers reads from any tables and things that we read for that purpose
  - we can then hash all the inputs to those tables
- tracking when we access metadata
  - we do this by registering a read of `MetaData(X)` for each foreign item `X` whose metadata we read
- hashing metadata from foreign items
  - we do this by loading up metadata from a file in the incr. comp. directory
  - if there is no file, we use the SVH for the entire crate

There is one very simple test only at this point. The next PR will be focused on expanding out the tests.

Note that this is based on top of rust-lang/rust#33228

r? @michaelwoerister
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants