You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not certain this is the right place, because the parsing of the test files appears to be done in rustc as well.
I had a problem while testing the threadpool-crate because all test run in parallel and all of them use the whole cpu.
Would it be possible to add a additional flag for test like this? Maybe something like this:
#[test]#[no_parallel]fntest_heavy_load_on_cpu_or_gpu_or_global_state(){// working hard here ...}
The implementation would have to queue these test and run them sequencally.
The flag no_parallel seems very expressiv, but I prefere a positive keyword like single or individual or something like this.
What do you think?
Regards
The text was updated successfully, but these errors were encountered:
Thanks for the report! This is actually more of a rustc bug than a Cargo bug (as the compiler is what processes these annotations), so you may want to open a bug over at rust-lang/rust.
I know I've wanted the ability to specify something like this before, though! One trick is to set RUST_TEST_THREADS=1 in the environment and that'll make sure the tests are single-threaded, but ideally there'd be a way to encode that in the source itself.
Okay, i will open another issue in Rust. In my case running all tests in a chain kills the performance oft the tests. So flagging just 2 out of 20+ tests would be very handy.
Hi all
I am not certain this is the right place, because the parsing of the test files appears to be done in rustc as well.
I had a problem while testing the threadpool-crate because all test run in parallel and all of them use the whole cpu.
Would it be possible to add a additional flag for test like this? Maybe something like this:
The implementation would have to queue these test and run them sequencally.
The flag
no_parallel
seems very expressiv, but I prefere a positive keyword likesingle
orindividual
or something like this.What do you think?
Regards
The text was updated successfully, but these errors were encountered: