mercredi 2 octobre 2019

How to run lib & integration tests only?

I have a project with library and two exes. When I type "cargo test", it runs 5 (!) executables: unit tests for lib and exes, integration tests, and doc tests.

Since I have only lib tests and integ tests, I get output like

running 0 tests                                                           
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

which is annoying.

I have tried to filter it by cargo parameters but failed. If I use "--lib" then no integration tests are run. And I didn't found any way to run integration tests only or to skip doc tests or exe tests from common run.

Is there any reasonable way to run both integration tests and library unit tests only?

Aucun commentaire:

Enregistrer un commentaire