Skip to content

Commit 9b4c48c

Browse files
committed
update(README): include test framework instructions
Signed-off-by: Diogo Costa <[email protected]>
1 parent b524010 commit 9b4c48c

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,72 @@ In IEEE Access, 2024. https://ieeexplore.ieee.org/document/10781314
141141

142142
10. Hidemasa Kawasaki and Soramichi Akiyama. "**Running Bao Hypervisor on gem5**"
143143
In gem5 blog, 2024. https://www.gem5.org/2024/11/12/bao-on-gem5.html
144+
145+
146+
Testing Framework Usage
147+
-----------------------
148+
149+
### Prerequisites
150+
- Ensure [Nix package manager](https://nixos.org/download.html) is installed.
151+
- After cloning the Bao repository, initialize and update the submodules (bao-nix and bao-tests):
152+
153+
```
154+
155+
git submodule update --init --recursive
156+
157+
```
158+
159+
- Install QEMU for your target platform via Nix (first-time runs may take time):
160+
161+
For **qemu-aarch64-virt**:
162+
```
163+
164+
nix-shell -p 'with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/0c924ec948073580a3c3d438746388d05a38028b.zip") {}; qemu' --run "true"
165+
166+
```
167+
168+
For **qemu-riscv64-virt**:
169+
```
170+
171+
nix-shell -p 'with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/0c924ec948073580a3c3d438746388d05a38028b.zip") {}; qemu_full' --run "true"
172+
173+
```
174+
175+
### Running Tests
176+
To run tests, invoke the framework using the Makefile target:
177+
178+
```
179+
180+
make tests PLATFORM=<platform> RECIPE=<recipe>
181+
182+
```
183+
184+
Example:
185+
186+
```
187+
188+
make tests PLATFORM=qemu-aarch64-virt RECIPE=single-baremetal/default.nix
189+
190+
```
191+
192+
This will run tests on the specified platform with the given recipe.
193+
194+
### Supported Platforms and Test Setups
195+
The following table summarizes the supported platforms and test setups for the Bao testing framework. It shows which setups support boot tests and which have IRQ tests implemented (e.g., UART and timer interrupts):
196+
197+
| Platform | Setup | Boot Tests | IRQ Tests |
198+
|:------------------:|:----------------:|:----------:|:---------------:|
199+
| qemu-aarch64-virt | single-baremetal | Yes | UART, Timer |
200+
| qemu-aarch64-virt | single-freertos | Yes | UART, Timer |
201+
| qemu-aarch64-virt | single-linux | Yes | No |
202+
| qemu-riscv64-virt | single-baremetal | Yes | UART, Timer |
203+
| qemu-riscv64-virt | single-freertos | Yes | UART, Timer |
204+
| qemu-riscv64-virt | single-linux | Yes | No |
205+
206+
Example enabling GICv3:
207+
208+
```
209+
210+
make tests PLATFORM=qemu-aarch64-virt RECIPE=single-baremetal/default.nix IRQC=gicv3
211+
212+
```

0 commit comments

Comments
 (0)