nextest-rs / nextest

A next-generation test runner for Rust.
https://nexte.st
Apache License 2.0
2.11k stars 92 forks source link

`list` (maybe `run`?) doesn't respect `CARGO_TARGET_{TRIPLE}_RUNNER` #57

Closed Jake-Shadle closed 2 years ago

Jake-Shadle commented 2 years ago

We build and test Windows binaries from Linux, and use CARGO_TARGET_{TRIPLE}_RUNNER to specify (in our case) wine so that we can test the binaries, however nextest doesn't seem to read this configuration and attempts to directly execute the test binaries when performing the initial test list before running the tests.

I can add support for this tomorrow in a PR, just thought I would file this issue for visibility. Great work on this btw!

sunshowers commented 2 years ago

Thanks for the kind words! Yes, nextest doesn't support that option today. This is a bug and a and a PR would be really welcome!

sunshowers commented 2 years ago

To determine platform etc support, you'll probably want to just use target-spec, which depends on your own cfg-expr library!

sunshowers commented 2 years ago

@Jake-Shadle I had a look at cargo's config and it feels like it'll be really hard to emulate all of it correctly. What do you think of adding this to nextest.toml instead?

sunshowers commented 2 years ago

@Jake-Shadle this is now released as 0.9.6 -- could you confirm that https://nexte.st/book/target-runners.html makes sense to you? Thanks!

Jake-Shadle commented 2 years ago

Thanks for the quick release! Yes, the docs make sense to me, I think the biggest thing is that people who are already using one of those methods for setting a target runner will be able to drop in nextest with no problems. :slightly_smiling_face: