-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tests should output the name before running #30047
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
Comments
CC #2873. |
The only reason this doesn't happen is multithreaded testing is enabled by default: if it is disabled (e.g. setting the env var // slowtest.rs
use std::thread;
#[test]
fn foo() {
thread::sleep_ms(1000);
}
#[test]
fn bar() {
thread::sleep_ms(500);
} Compile that with I can't think of a good way to solve the multithreaded case, without using fancier terminal features to indicate which tests are running, and then rewriting the screen to fill in the results as they finish. |
Ah, that's actually enough to be a viable workaround for me. Maybe there could be some better doc about it (I googled for this and found nothing), but otherwise I'm fine with just using ...THREADS=1. |
FWIW< it and a few other things are mentioned in the |
Conflicts with another want to invert status and filename |
I think there is a lot of room for improvement in the |
Currently with standard testing, unittests only print out the name + result after they finish. This is usually good, apart from when tests hang. In that case you have to manually try to find the right test, which can take some time depending on a project.
Test build should either output the test name before running it by default, or at least print out a new message about starting the test run when some option is provided.
Of course this gets harder when multithreded testing is active.
The text was updated successfully, but these errors were encountered: