Skip to content

Integrate libtest_mimic runner in rustest codebase ? #34

@mgautierfr

Description

@mgautierfr

This is an issue to track the idea of integrating libtest_mimic in rustest's code.

Running test sequentially (#16) can be implemented with a set of Mutex as suggested, but it would better be implemented by having the test runner handling it directly and simply don't launch in parallel tests that should be sequential.

Ignore is handled in libtest_mimic with Outcome but it is private. So we have to define ignore at setup level. Tests or fixtures cannot mark a test as ignore themselves.

Conditional xfail (#10) may also be implemented by some kind of wrapper around the test. But I have the feeling this would add another level of indirection on current code base (and it start to be a bit complex as we have libtest_mimic which run a rustest wrapper around a lambda returning the actual test runner (https://github.com/mgautierfr/rustest/blob/main/rustest/src/test.rs#L124-L152)). It would be better to "flat" all this.

Capture output (#8) is kind of impossible in stable. But we can workaround with specific "trace" macro instead of println! (LukasKalbertodt/libtest-mimic#48 adds it to libtest_mimic but it seems dead since november 2024)

On top of that, libtest_mimic owner seems to not respond to PR/issue since few months. Nothing alarming but if libtest_mimic starts to be unmaintained, forking/integrating it in rustest may be a good move.
However, integrating it in rustest adds a lot of responsibility to what is currently a "small" crate. Not sure it worth it until we agree it is a blocker for a valuable feature/improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions