|
|
|
|
|
by phil-opp
2606 days ago
|
|
Author here. This post is a rewrite of the previous Unit Testing [1] and Integration Tests [2] posts. It creates a custom test framework that runs test functions inside QEMU, so that they run in a realistic environment (compared to running on the host system). [1]: https://os.phil-opp.com/unit-testing/
[2]: https://os.phil-opp.com/integration-tests/ The new test framework directly works with `cargo xtest`, which brings the project closer to using standard cargo programs for building, testing, and running. The last remaining step is the `std` Aware Cargo RFC [3]. When the RFC is merged and implemented, cargo-xbuild will no longer be needed and the familiar cargo build, cargo run, and cargo test commands will just work, including IDE integration. [3]: https://github.com/rust-lang/rfcs/pull/2663 |
|