move
move copied to clipboard
Add a test mode where all failing tests are run.
Known failing tests will be added to help contributors work on specific tasks. Once that task is done the failing test will be enabled. In the mean time developers should be able to run those with a flag that is passed to cargo test
Our test harnesses use the datatest_stable crate to implement tests. We do this because it is what the other move crates use for their tests. datatest_stable doesn't appear to expose a way to mark tests as ignored in the way the stock test harness does.
Our test harnesses have a hack that lets broken tests be ignored by writing
// ignore
on them, but this just passes the tests and prints a message to stderr. It does not provide the control to run all ignored tests.
The underlying libtest_mimic
crate that datatest_stable uses does seem to have "ignore" functionality. Adding this ability to our tests would probably require modifying datatest_stable and adding hooks to the test runner setup code that allows us to inspect the test before running it and mark it as ignored within libtest_mimic.
Maybe we can pass a flag say '--run-ignore' to cargo test, and use that to run ignored tests?
https://doc.rust-lang.org/book/ch11-02-running-tests.html#ignoring-some-tests-unless-specifically-requested might be related but I'm not very sure.
tracking in: https://github.com/move-language/move/issues/921