-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cargo test makes gtk application crash on OSX #5438
Comments
I guess this is this test. |
I'd suspect the issue is this:
AFAIK, you cannot limit libtest to the main thread. Setting |
That is what we thought then. Can't we set this behavior as default on OSX in cargo? |
A random idea, but wouldn’t passing test-threads=1 help? By default, tests are multithreaded, so defaulting to main thread on macos does not make sense. |
@matklad: Still failing. |
It still spins up 1 thread off main to run the tests on. Not sure if that's fixable (see a very old discussion here). |
Well, it does help in a way since it allows to avoid GTK context conflicts. But that doesn't solve the issue on OSX. I'll just add explanations about this in the README and hope that people will add |
Is it possible to move forward with this ticket in cargo, or should we just close it? |
@dwijnand closing makes sense to me: it's not a Cargo issue, its a test harness issue. |
There was a recent change (rust-lang/rust#56243) so that libtest will not spawn a thread when concurrency is set to 1. That may be good enough. |
Sorry but I can't get much information out of the run:
It runs perfectly fine when the test code is moved inside a
main
and then run withcargo run
but it just crashes without reason otherwise...The text was updated successfully, but these errors were encountered: