Skip to content

test: Don't panic if some tests failed #27869

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

Merged
merged 1 commit into from
Aug 18, 2015

Conversation

alexcrichton
Copy link
Member

This commit removes the call to panic!("Some tests failed") at the end of all
tests run when running with libtest. The panic is replaced with
std::process::exit to have a nonzero error code, but this change both:

  1. Makes the test runner no longer print out the extraneous panic message at the
    end of a failing test run that some tests failed. (this is already summarized
    in the output of the test run).
  2. When running tests with RUST_BACKTRACE set it removes an extraneous
    backtrace from the output (only failing tests will have their backtraces in
    the output.

This commit removes the call to `panic!("Some tests failed")` at the end of all
tests run when running with libtest. The panic is replaced with
`std::process::exit` to have a nonzero error code, but this change both:

1. Makes the test runner no longer print out the extraneous panic message at the
   end of a failing test run that some tests failed. (this is already summarized
   in the output of the test run).
2. When running tests with `RUST_BACKTRACE` set it removes an extraneous
   backtrace from the output (only failing tests will have their backtraces in
   the output.
@alexcrichton
Copy link
Member Author

r? @brson

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented Aug 17, 2015

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 17, 2015

📌 Commit bfc4583 has been approved by brson

@nagisa
Copy link
Member

nagisa commented Aug 17, 2015

Just wanted to mention that this prevents dropping of opts variable from above. Might or might not be something to consider.

@huonw
Copy link
Member

huonw commented Aug 17, 2015

@nagisa do you have a specific problem in mind because of that? (NB. the process is exiting and the operating system will automatically reclaim the memory.)

@bors
Copy link
Collaborator

bors commented Aug 18, 2015

⌛ Testing commit bfc4583 with merge a91f19f...

bors added a commit that referenced this pull request Aug 18, 2015
This commit removes the call to `panic!("Some tests failed")` at the end of all
tests run when running with libtest. The panic is replaced with
`std::process::exit` to have a nonzero error code, but this change both:

1. Makes the test runner no longer print out the extraneous panic message at the
   end of a failing test run that some tests failed. (this is already summarized
   in the output of the test run).
2. When running tests with `RUST_BACKTRACE` set it removes an extraneous
   backtrace from the output (only failing tests will have their backtraces in
   the output.
@nagisa
Copy link
Member

nagisa commented Aug 18, 2015

Only the fact that valgrind might complain.
On Aug 18, 2015 2:57 AM, "Huon Wilson" [email protected] wrote:

@nagisa https://github.com/nagisa do you have a specific problem in
mind because of that? (NB. the process is exiting and the operating system
will automatically reclaim the memory.)


Reply to this email directly or view it on GitHub
#27869 (comment).

@bors bors merged commit bfc4583 into rust-lang:master Aug 18, 2015
@alexcrichton alexcrichton deleted the libtest-panic branch August 21, 2015 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants