os-test-framework
Test framework for embedded systems and OS kernels.
os-test-framework requires alloc, so your kernel will need a global-allocator.
Getting Started
First, enable custom_test_frameworks, set test_runner as the test runner from os-test-framework, and reexport_test_harness_main.
Implement Platform. The framework writes output through Platform::print
and finishes the run through Platform::exit:
use Arguments;
use ;
;
Call init_platform with your Platform, and test_main from your kernel entry point:
use init_platform;
Forward panics from your OS to os-test-framework:
use PanicInfo;
!
Adding A Test
You can declare tests like this:
use test;
test!
You can add multiple tests in the same file:
use test;
test!
test!