Change the way unit tests are built and run #3939
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @graydon
This series changes the build such that libraries are not completely rebuilt when testing. Instead, the tests are built into the libraries, and driver.rs is modified to run the tests directly out of them. It should make cycle times faster.
This will add some binary size to the libraries, but I figure we can have a 'release mode' some day that doesn't build them. It will also slightly increase the normal, non-testing, build times.
To make this work I modified
rustc::front::test
to fold in the test modifications any time the 'test' cfg is active, allowing the test modifications to be performed on libraries in addition to executables (previously this was only done with the--test
flag, which turns on both--cfg test
and--bin
).Measurements forthcoming.