-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
streamline bin injection into integration test #917
Comments
Some notes for my future self:
|
One use case that we need to think about is integration tests that use multiple binaries:
Not supporting this would diminish the value of nextest and cargo-dist, I think. An alternative might be that nextest lets you say: if you're building a particular crate's tests, also build this other binary -- then set Another option is to support this in setup scripts (#683). That requires even more design work. |
After some discussion it became clear that point 6 was especially salient. Users would have needed to modify their code to conditionally check for NEXTEST_BIN_EXE_* anyway, so we can just do the same thing with our own var:
With this you can |
I'm going to close this as resolved for now, but I'll reopen if I see more room for tighter integration. |
A frequent ask for cargo-dist is automated testing of shippable builds. One of the most obvious ways to do that would be to inject the shippable from e.g. your Github Release into your Cargo binary integration tests (
/tests/
), which already are injecting binaries for you withCARGO_BIN_EXE_my-app
(andNEXTEST_BIN_EXE_my-app
).It seems like the machinery is basically there with nextest's features for reusing builds, but all the docs seem focused on reusing builds of the tests and not builds of the apps, so it's not clear to me what needs to be done to make it work.
Ideally I could have a workflow like:
cargo nextest run --archive-file=... -- my-app:/path/to/my-app.exe my-other-app:/path/to/my-other-app.exe
(paths could also be injected with env-vars or json files, I don't terribly care how it works as long as it's easy/reliable to do on all platforms. ideally i wouldn't have to edit the archive-file to inject the paths, because the paths may be difficult to predict before runtime.)
Also it would of course be ideal if this also worked with all the great cross-compilation-prebuild stuff you have.
The text was updated successfully, but these errors were encountered: