You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful and good to be able to ourselves run unit tests for all the crates that we are using (currently 478 crates!) and verify they pass on all platforms we are targeting.
This becomes extra important as we bring up new platforms (related: #18) and environments where 3rd party crates have never run and most likely don't have access to run on (consoles).
This is likely a fairly large undertaking to make robust, fast, and fully useful in practice across a wider set of platforms. So is unlikely a task for 2019 but something that we would like to eventually have in some capacity.
Requirements
One would want this to work transitively so the crate dependencies of our crate dependencies get tested as well. And that the exact versions we are using are tested (including if using multiple versions of the same crate). Easiest here is likely to simple test all crates that are in the Cargo.lock file for our repos, the metadata section does include a flat list of exact versions:
It would be excellent to run crate dependency tests on our ordinary CI on commits where Cargo.lock has been changed. It would be ok for such commits to be verified a bit slower than ordinary commits, but can't block it for hours.
Challenges
Lots!
Quite a few crates do not contain tests in the published version on crates.io.
An example of this is hyper who's tests/ folder is not included
This makes sense in general as there is no built in mechanism to run tests on downloaded crates so no expectation on it
An alternative would be to pull down the repo from its git repository tag and build that, but another challenge with that approach is to figure out which revision to pull and build.
Oh, probably I have something. Give a try to this small tool that I've done for myself a long time ago. Perhaps it will cover somehow your needs (or at least part of it)
It would be useful and good to be able to ourselves run unit tests for all the crates that we are using (currently 478 crates!) and verify they pass on all platforms we are targeting.
This becomes extra important as we bring up new platforms (related: #18) and environments where 3rd party crates have never run and most likely don't have access to run on (consoles).
This is likely a fairly large undertaking to make robust, fast, and fully useful in practice across a wider set of platforms. So is unlikely a task for 2019 but something that we would like to eventually have in some capacity.
Requirements
One would want this to work transitively so the crate dependencies of our crate dependencies get tested as well. And that the exact versions we are using are tested (including if using multiple versions of the same crate). Easiest here is likely to simple test all crates that are in the
Cargo.lock
file for our repos, the metadata section does include a flat list of exact versions:It would be excellent to run crate dependency tests on our ordinary CI on commits where
Cargo.lock
has been changed. It would be ok for such commits to be verified a bit slower than ordinary commits, but can't block it for hours.Challenges
Lots!
hyper
who'stests/
folder is not includedRelated
The text was updated successfully, but these errors were encountered: