move icon indicating copy to clipboard operation
move copied to clipboard

Add a test mode where all failing tests are run.

Open ksolana opened this issue 2 years ago • 4 comments

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

ksolana avatar Feb 21 '23 15:02 ksolana

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.

brson avatar Feb 21 '23 21:02 brson

Maybe we can pass a flag say '--run-ignore' to cargo test, and use that to run ignored tests?

ksolana avatar Feb 22 '23 05:02 ksolana

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.

ksolana avatar Feb 22 '23 05:02 ksolana

tracking in: https://github.com/move-language/move/issues/921

ksolana avatar Feb 22 '23 06:02 ksolana