This PR makes it possible to run on-target unit tests for the various workspace crates by allowing them (and the ktest crate) to pull in the kernel itself as a dependency. This has a few advantages:
on-target tests are closest to the real thing and though slower IMO much preferrable
using this setup, the startup process for unit tests is entirely the same as running the whole system except for switching out the kmain function for the test runner. Again, being close to the real scenario is better
The "main" kernel entry point will be treated as its own test case, so we can run kernel unit tests through the lib.rs file and bootstrap into the full OS for running more complex integration tests through main.rs
This PR makes it possible to run on-target unit tests for the various workspace crates by allowing them (and the
ktest
crate) to pull in the kernel itself as a dependency. This has a few advantages:kmain
function for the test runner. Again, being close to the real scenario is betterlib.rs
file and bootstrap into the full OS for running more complex integration tests throughmain.rs