-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Introduce 'cargotest' and the check-cargotest buildstep #32348
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
Conversation
@@ -300,6 +305,9 @@ impl<'a> Step<'a> { | |||
Source::ToolRustbook { stage } => { | |||
vec![self.librustc(self.compiler(stage))] | |||
} | |||
Source::ToolCargoTest { stage } => { | |||
vec![self.librustc(self.compiler(stage))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this doesn't actually depend on the compiler libraries, so I think this can just be libstd
Looks good to me, although I do think that we'll want to check in a lock file to ensure that tests don't break to unintended consequences. |
const TEST_REPOS: &'static [(&'static str, &'static str)] = &[ | ||
("https://github.com/rust-lang/cargo", | ||
"ff02b156f094fb83e70acd965c83c9286411914e"), | ||
("https://github.com/retep998/winapi-rs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it should be worth pointing out that building cargo will effectively build winapi anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good point. I'll remove winapi then. No sense doubling the work.
Edit: I assume winapi doesn't have many or any tests that we could be running. That would be a reason to leave it on the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Winapi does have tests, but they're almost entirely "Does this function link?" and "Is this type the right size and alignment?" so I don't mind if those tests aren't run for cargotest. Winapi being built and linked into cargo should be enough to catch the important regressions.
🏆 this is great to see happening! |
OK, I'm going to remove the winapi crate and just land this. Cargo already has a lockfile so the test itself doesn't need explicit support. This whole effort may simply end at testing cargo on every commit. |
It may also be prudent to pull in some of the gl/opengl/gfx/glutin/glium ecosystem over time as well, those also seem to be quite sizable projects which have a risk of breakage |
d4cd11b
to
6493019
Compare
I've replaced winapi with iron, added lockfiles and the 'cargotest' makefile target. |
@bors: r+ 6493019408523d82e630618b1823b3bfdd8523cd Exciting! |
This is a new suite of tests that verifies that the compiler builds specific revisions of select crates from crates.io. It does not run by default. It is intended that buildbot runs these tests against all PRs, and gate on them.
@bors r=alexcrichton |
📌 Commit 3a790ac has been approved by |
⌛ Testing commit 3a790ac with merge d6af19b... |
Introduce 'cargotest' and the check-cargotest buildstep This is a new suite of tests that verifies that the compiler builds specific revisions of select crates from crates.io. It does not run by default. It is intended that bors runs these tests against all PRs, and gates on them. In this way we will make it harder still to break important swaths of the ecosystem, even on nightly. This is a very basic implementation intended for feedback. The biggest thing it probably should do but doesn't is use a lockfile for every project it builds. r? @alexcrichton cc @rust-lang/lang @rust-lang/libs
This is a new suite of tests that verifies that the compiler builds specific revisions of select crates from crates.io.
It does not run by default. It is intended that bors runs these tests against all PRs, and gates on them. In this way we will make it harder still to break important swaths of the ecosystem, even on nightly.
This is a very basic implementation intended for feedback. The biggest thing it probably should do but doesn't is use a lockfile for every project it builds.
r? @alexcrichton cc @rust-lang/lang @rust-lang/libs