panic=abort support in libtest by tmandry · Pull Request #64158 · rust-lang/rust (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
bors added a commit that referenced this pull request
panic=abort support in libtest
Add experimental support for tests compiled with panic=abort. Enabled with -Z panic_abort_tests
.
r? @alexcrichton cc @cramertj
This was referenced
Sep 29, 2019
tmandry deleted the libtest-panic-abort branch
alexcrichton added a commit to alexcrichton/cargo that referenced this pull request
Recently added in rust-lang/rust#64158 the -Z panic-abort-tests
flag
to the compiler itself will activate a mode in the test
crate which
enables running tests even if they're compiled with panic=abort
. It
effectively runs a test-per-process.
This commit brings the same support to Cargo, adding a -Z panic-abort-tests
flag to Cargo which allows building tests in
panic=abort
mode. While I wanted to be sure to add support for this in
Cargo before we stabilize the flag in rustc
, I don't actually know how
we're going to stabilize this here. Today Cargo will automatically
switch test targets to panic=unwind
, and so if we actually were to
stabilize this flag then this configuration would break:
[profile.dev]
panic = 'abort'
In that case tests would be compiled with panic=unwind
(due to how
profiles work today) which would clash with crates also being compiled
with panic=abort
. I'm hopeful though that we can perhaps either figure
out a solution for this and maybe even integrate it with the ongoing
profiles work.
bors added a commit to rust-lang/cargo that referenced this pull request
Support rustc's -Z panic-abort-tests
in Cargo
Recently added in rust-lang/rust#64158 the -Z panic-abort-tests
flag
to the compiler itself will activate a mode in the test
crate which
enables running tests even if they're compiled with panic=abort
. It
effectively runs a test-per-process.
This commit brings the same support to Cargo, adding a -Z panic-abort-tests
flag to Cargo which allows building tests in
panic=abort
mode. While I wanted to be sure to add support for this in
Cargo before we stabilize the flag in rustc
, I don't actually know how
we're going to stabilize this here. Today Cargo will automatically
switch test targets to panic=unwind
, and so if we actually were to
stabilize this flag then this configuration would break:
[profile.dev]
panic = 'abort'
In that case tests would be compiled with panic=unwind
(due to how
profiles work today) which would clash with crates also being compiled
with panic=abort
. I'm hopeful though that we can perhaps either figure
out a solution for this and maybe even integrate it with the ongoing
profiles work.
dennisschagt added a commit to dennisschagt/newsboat that referenced this pull request