Ability to run cargo tests on main thread. #128061
Labels
A-libtest
Area: `#[test]` / the `test` library
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-testing-devex
Relevant to the testing devex team (testing DX), which will review and decide on the PR/issue.
Problem
While working with
winit
orglfw
I would like to use regularcargo test
to test some screens or views. The problem is thatmacOS
requires all theGUI
stuff to be initialized from main thread and these tests panic.winit
:glfw
:Proposed Solution
Add the ability for cargo tests to be run on the main thread. It may look something like this:
Notes
This issue bothers many
Rust
developers. Here are some related issues:gtk-rs/gtk4-rs#1235
rust-lang/cargo#3927
rust-lang/cargo#5438
https://stackoverflow.com/questions/43458194/is-there-any-way-to-tell-cargo-to-run-its-tests-on-the-main-thread
The text was updated successfully, but these errors were encountered: