Polish OSDK documentation

This commit is contained in:
Jianfeng Jiang
2024-05-22 06:04:36 +00:00
committed by Tate, Hongliang Tian
parent 07caaa5b3f
commit 1391ff59f2
20 changed files with 253 additions and 164 deletions

View File

@ -1,4 +1,4 @@
# Testing or Running an OS Project
# Running or Testing an OS Project
OSDK allows for convenient building, running,
and testing of an OS project.
@ -20,6 +20,11 @@ simply type:
cargo osdk build
```
The initial build of an OSDK project
may take a considerable amount of time
as it involves downloading the Rust toolchain used by the framekernel.
However, this is a one-time process.
## Run the project
To launch the kernel with QEMU,
@ -42,6 +47,14 @@ library projects cannot.
## Test the project
Suppose you have created a new library project named `mylib`
which contains a default test case
and you are in the project directory.
```bash
cargo osdk new --lib mylib && cd mylib
```
To run the kernel mode tests, use the following command:
```bash
@ -50,6 +63,9 @@ cargo osdk test
OSDK will run all the kernel mode tests in the crate.
Test cases can be added not only in library projects
but also in kernel projects.
If you want to run a specific test with a given name,
for example, if the test is named `foo`,
use the following command: