-
Notifications
You must be signed in to change notification settings - Fork 381
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
RUN: enable --show-output when executing tests #4139
Conversation
5e4d090
to
bc1d021
Compare
src/test/kotlin/org/rust/cargo/runconfig/CargoTestRunStateTest.kt
Outdated
Show resolved
Hide resolved
src/test/kotlin/org/rust/cargo/runconfig/CargoTestRunStateTest.kt
Outdated
Show resolved
Hide resolved
src/test/kotlin/org/rust/cargo/runconfig/CargoTestRunStateTest.kt
Outdated
Show resolved
Hide resolved
bc1d021
to
d18c7e4
Compare
d18c7e4
to
c6767e8
Compare
Show output of successful tests when running on a rust version that supports doing so (1.39.0+)
c6767e8
to
50cc65d
Compare
The feature has been merged and is available in Rust 1.39 nightly builds with a build date of 28-08-2019 or later. I've updated this PR accordingly and fixed the merge conflict |
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.
Thanks!
bors+
|
||
private fun checkShowOutputSupport(ver: RustcVersion?): Boolean { | ||
if (ver == null) return false | ||
// --show-output is supported since 1.39.0-nightly/dev with a build date later than 2019-08-27 |
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.
Can we check that this flag is supported without version checking? Like we do with some other flags
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.
I think no. The --show-output
is only mentioned in cargo test -- --help
output, but this command may trigger compilation.
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.
i don't think it's possible to detect this without compiling tests as it's a feature in libtest that's only in the resulting test binary
bors r+ |
4139: RUN: enable --show-output when executing tests r=mchernyavsky a=emmericp Fixes #3994 This requires this patch for rust (hopefully in 1.38?): rust-lang/rust#62600 This is work in progress because it doesn't work yet, I'm looking for some help here: The problem is you can't run `rustVersion()` in the UI thread and I'd really like to have this behavior as default if the compiler is new enough. What's the best way to achieve this? Fallback would be to make this an option for the run configuration, but that would be a little bit annoying since virtually everyone would want to enable this? Edit: changed the code to hardcode 1.38 as Rust version passed to `patchArgs` because I'm using this branch ;) Looking for a good way to get the Rust version here. <!-- Hello and thank you for the pull request! We don't have any strict rules about pull requests, but you might check https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTING.md for some hints! Note that we need an electronic CLA for contributions: https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTING.md#cla After you sign the CLA, please add your name to https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTORS.txt :) --> Co-authored-by: Paul Emmerich <[email protected]>
Fixes #3994
This requires this patch for rust (hopefully in 1.38?): rust-lang/rust#62600
This is work in progress because it doesn't work yet, I'm looking for some help here:
The problem is you can't run
rustVersion()
in the UI thread and I'd really like to have this behavior as default if the compiler is new enough.What's the best way to achieve this? Fallback would be to make this an option for the run configuration, but that would be a little bit annoying since virtually everyone would want to enable this?
Edit: changed the code to hardcode 1.38 as Rust version passed to
patchArgs
because I'm using this branch ;) Looking for a good way to get the Rust version here.