Tests
This commit is contained in:
26
Cargo.toml
26
Cargo.toml
@@ -4,17 +4,33 @@ version = "0.1.0"
|
||||
authors = ["Sainnhe Park <sainnhe@gmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[profile.dev]
|
||||
panic = "abort" # 禁用 panic 时的栈展开
|
||||
|
||||
[profile.release]
|
||||
panic = "abort" # 禁用 panic 时的栈展开
|
||||
# 只能先把这部分注释掉,因为 cargo 还没有修复这个 bug
|
||||
# https://github.com/rust-lang/cargo/issues/7359
|
||||
# [profile.dev]
|
||||
# panic = "abort" # 禁用 panic 时的栈展开
|
||||
#
|
||||
# [profile.release]
|
||||
# panic = "abort" # 禁用 panic 时的栈展开
|
||||
|
||||
[dependencies]
|
||||
bootloader = "0.9.8"
|
||||
volatile = "0.2.6"
|
||||
spin = "0.5.2"
|
||||
x86_64 = "0.14.2"
|
||||
uart_16550 = "0.2.0"
|
||||
|
||||
[dependencies.lazy_static]
|
||||
version = "1.0"
|
||||
features = ["spin_no_std"]
|
||||
|
||||
[package.metadata.bootimage]
|
||||
test-args = [
|
||||
"-device", "isa-debug-exit,iobase=0xf4,iosize=0x04", "-serial", "stdio",
|
||||
"-display", "none"
|
||||
]
|
||||
test-success-exit-code = 33
|
||||
test-timeout = 300 # 设定 300 秒后超时
|
||||
|
||||
[[test]]
|
||||
name = "should_panic"
|
||||
harness = false # 禁用 test runner, 让 should_panic 作为一个常规的可执行文件存在
|
||||
|
||||
Reference in New Issue
Block a user