Skip to content

Commit 0fc00db

Browse files
committed
chore: alias cargo r3testcargo run -p r3_test_runner
1 parent ce8b562 commit 0fc00db

File tree

3 files changed

+32
-28
lines changed

3 files changed

+32
-28
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
r3test = "run --package r3_test_runner --quiet --"

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ jobs:
254254

255255
- name: Test
256256
run: |
257-
cargo run --package r3_test_runner -- --target ${{ matrix.runner_target }} ${{ matrix.runner_args }} --log-level debug
257+
cargo r3test --target ${{ matrix.runner_target }} ${{ matrix.runner_args }} --log-level debug
258258
259259
# Build a small subset of tests for real freestanding targets
260260
build-freestanding:
@@ -308,4 +308,4 @@ jobs:
308308

309309
- name: Build tests
310310
run: |
311-
cargo run --package r3_test_runner -- --target ${{ matrix.runner_target }} ${{ matrix.runner_args }} --norun basic
311+
cargo r3test --target ${{ matrix.runner_target }} ${{ matrix.runner_args }} --norun basic

doc/testing.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,28 @@ This document explains how to use the test suite and what is needed to do so.
2121

2222
`cargo test --all` runs all tests including the kernel test suite (with all optional features enabled) on the host environment.
2323

24+
`cargo r3test` is an alias of `cargo run -p r3_test_runner` (defined in `.cargo/config.toml`).
25+
2426
The following table shows how to run the kernel test suite for each target.
2527

26-
| Architecture | Board | Command |
27-
|-----------------|-------------------------------------------|-----------------------------------------------------------------------|
28-
| Host | Host | `cargo test -p r3_port_std --features r3_test_suite/full` |
29-
| Armv7-M+FPU+DSP | [NUCLEO-F401RE][] | `cargo run -p r3_test_runner -- -t nucleo_f401re` |
30-
| Armv8-MML+FPU | [Arm MPS2+][] [AN505][] (QEMU) | `cargo run -p r3_test_runner -- -t qemu_mps2_an505` |
31-
| Armv8-MML | Arm MPS2+ AN505 (QEMU) | `cargo run -p r3_test_runner -- -t qemu_mps2_an505 -a cortex_m33` |
32-
| Armv8-MBL | Arm MPS2+ AN505 (QEMU) | `cargo run -p r3_test_runner -- -t qemu_mps2_an505 -a cortex_m23` |
33-
| Armv7-M | Arm MPS2+ [AN385][] (QEMU) | `cargo run -p r3_test_runner -- -t qemu_mps2_an385` |
34-
| Armv6-M | Arm MPS2+ AN385 (QEMU) | `cargo run -p r3_test_runner -- -t qemu_mps2_an385 -a cortex_m0` |
35-
| Armv6-M | [Raspberry Pi Pico][] (USB) | `cargo run -p r3_test_runner -- -t rp_pico` |
36-
| Armv7-A | [GR-PEACH][] | `cargo run -p r3_test_runner -- -t gr_peach` |
37-
| Armv7-A | [Arm RealView PBX for Cortex-A9][] (QEMU) | `cargo run -p r3_test_runner -- -t qemu_realview_pbx_a9` |
38-
| RV32IMAC | [SiFive E][] (QEMU) | `cargo run -p r3_test_runner -- -t qemu_sifive_e_rv32` |
39-
| RV32GC | [SiFive U][] (QEMU) | `cargo run -p r3_test_runner -- -t qemu_sifive_u_rv32` |
40-
| RV64IMAC | SiFive U (QEMU) | `cargo run -p r3_test_runner -- -t qemu_sifive_u_rv64 -a rv64i+m+a+c` |
41-
| RV64GC | SiFive U (QEMU) | `cargo run -p r3_test_runner -- -t qemu_sifive_u_rv64` |
42-
| RV32IMAC | [RED-V][] (SPI flash XIP) | `cargo run -p r3_test_runner -- -t red_v` |
43-
| RV64GC | [Maix][] boards (UART ISP) | `cargo run -p r3_test_runner -- -t maix` |
28+
| Architecture | Board | Command |
29+
|-----------------|-------------------------------------------|-----------------------------------------------------------|
30+
| Host | Host | `cargo test -p r3_port_std --features r3_test_suite/full` |
31+
| Armv7-M+FPU+DSP | [NUCLEO-F401RE][] | `cargo r3test -t nucleo_f401re` |
32+
| Armv8-MML+FPU | [Arm MPS2+][] [AN505][] (QEMU) | `cargo r3test -t qemu_mps2_an505` |
33+
| Armv8-MML | Arm MPS2+ AN505 (QEMU) | `cargo r3test -t qemu_mps2_an505 -a cortex_m33` |
34+
| Armv8-MBL | Arm MPS2+ AN505 (QEMU) | `cargo r3test -t qemu_mps2_an505 -a cortex_m23` |
35+
| Armv7-M | Arm MPS2+ [AN385][] (QEMU) | `cargo r3test -t qemu_mps2_an385` |
36+
| Armv6-M | Arm MPS2+ AN385 (QEMU) | `cargo r3test -t qemu_mps2_an385 -a cortex_m0` |
37+
| Armv6-M | [Raspberry Pi Pico][] (USB) | `cargo r3test -t rp_pico` |
38+
| Armv7-A | [GR-PEACH][] | `cargo r3test -t gr_peach` |
39+
| Armv7-A | [Arm RealView PBX for Cortex-A9][] (QEMU) | `cargo r3test -t qemu_realview_pbx_a9` |
40+
| RV32IMAC | [SiFive E][] (QEMU) | `cargo r3test -t qemu_sifive_e_rv32` |
41+
| RV32GC | [SiFive U][] (QEMU) | `cargo r3test -t qemu_sifive_u_rv32` |
42+
| RV64IMAC | SiFive U (QEMU) | `cargo r3test -t qemu_sifive_u_rv64 -a rv64i+m+a+c` |
43+
| RV64GC | SiFive U (QEMU) | `cargo r3test -t qemu_sifive_u_rv64` |
44+
| RV32IMAC | [RED-V][] (SPI flash XIP) | `cargo r3test -t red_v` |
45+
| RV64GC | [Maix][] boards (UART ISP) | `cargo r3test -t maix` |
4446

4547
[NUCLEO-F401RE]: https://www.st.com/en/evaluation-tools/nucleo-f401re.html
4648
[Arm MPS2+]: https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps2
@@ -58,14 +60,14 @@ The following table shows how to run the kernel test suite for each target.
5860

5961
The `-b` option instructs `r3_test_runner` to run benchmark tests. Note that some targets (notably QEMU Arm-M machines, which lack DWT) don't support benchmarking and the test code might crash, stall, or simply fail to compile on such targets.
6062

61-
| Architecture | Board | Command |
62-
| ------------ | ----------------------- | ----------------------------------------------------------- |
63-
| Host | Host | `cargo bench -p r3_port_std` |
64-
| Armv7-M | NUCLEO-F401RE | `cargo run -p r3_test_runner -- -t nucleo_f401re -b` |
65-
| Armv7-A | GR-PEACH | `cargo run -p r3_test_runner -- -t gr_peach -b` |
66-
| Armv6-M | Raspberry Pi Pico (USB) | `cargo run -p r3_test_runner -- -t rp_pico -b` |
67-
| RV32IMAC | RED-V (SPI flash XIP) | `cargo run -p r3_test_runner -- -t red_v -b` |
68-
| RV64GC | Maix boards (UART ISP) | `cargo run -p r3_test_runner -- -t maix -b` |
63+
| Architecture | Board | Command |
64+
|--------------|-------------------------|------------------------------------|
65+
| Host | Host | `cargo bench -p r3_port_std` |
66+
| Armv7-M | NUCLEO-F401RE | `cargo r3test -t nucleo_f401re -b` |
67+
| Armv7-A | GR-PEACH | `cargo r3test -t gr_peach -b` |
68+
| Armv6-M | Raspberry Pi Pico (USB) | `cargo r3test -t rp_pico -b` |
69+
| RV32IMAC | RED-V (SPI flash XIP) | `cargo r3test -t red_v -b` |
70+
| RV64GC | Maix boards (UART ISP) | `cargo r3test -t maix -b` |
6971

7072

7173
## Configuring udev

0 commit comments

Comments
 (0)