Skip to content

Commit

Permalink
bare-test fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ZR233 committed Jan 20, 2025
1 parent 10284e8 commit 7b204a0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion app/simple_test/tests/test1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#[bare_test::tests]
mod tests {
use core::hint::spin_loop;

use bare_test::*;
use globals::{PlatformInfoKind, global_val};
Expand Down
2 changes: 1 addition & 1 deletion crates/bare-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bare-test"
version = "0.3.0"
version = "0.3.1"
authors = ["Zhourui <zrufo747@outlook.com>"]
edition = "2021"
repository = "https://github.com/qclic/sparreal-os/tree/main/crates/bare-test"
Expand Down
8 changes: 6 additions & 2 deletions crates/bare-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ A test framework for testing the bare metal.
[build-dependencies]
bare-test-macros = "0.2"
[[test]]
name = "test"
harness = false
```

4. setup `build.rs`.
Expand All @@ -37,7 +41,7 @@ A test framework for testing the bare metal.
}
```

5. new `tests` dir and add `tests.rs`.
5. new `tests` dir and add `test.rs`.

```rust
#![no_std]
Expand All @@ -59,7 +63,7 @@ A test framework for testing the bare metal.
}
```

6. run `cargo test --test tests -- --show-output`.
6. run `cargo test --test test -- --show-output`.

7. for uboot board test:

Expand Down

0 comments on commit 7b204a0

Please sign in to comment.