LukasKalbertodt / libtest-mimic

A small test framework to write your own test harness that looks and behaves like the built-in test harness used by `rustc --test`
https://docs.rs/libtest-mimic
Apache License 2.0
95 stars 26 forks source link

no_std support? #21

Open berkus opened 1 year ago

berkus commented 1 year ago

I am using a custom test harness for OSdev, but wondering if this could do no_std as well?

LukasKalbertodt commented 1 year ago

Hi! I don't quite understand the use case yet. Is it a requirement to run the tests in a no-std environment? Usually for tests you can just use your development machine, no? Care to elaborate on your use case?

Apart from that, I don't really see how this library could become no_std. For one, it parses command line arguments via clap: clap doesn't yet support no_std and how would that work without std::env anyway? Also, libtest-mimic uses multi-threading to run tests in parallel. That couuuld in theory be gated behind a crate feature, but I don't think I woudl want the extra maintenance overhead.

berkus commented 1 year ago

Yes, the tests run in the no_std environment, usually via QEMU or other emulator.

berkus commented 1 year ago

This is how it typically works.