bootloader icon indicating copy to clipboard operation
bootloader copied to clipboard

How to run cargo test with the simple_boot example?

Open iddm opened this issue 4 years ago • 0 comments

How can I run the cargo test using the simple_boot example? I have the krun, kimage and kbuild aliases in my .cargo/config file but how do I write one for testing?

[target.'cfg(target_os = "none")']
runner = "cargo run --package simple_boot --"

[alias]
kbuild = "build --target x86_64-my_os.json -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem"
kimage = "run --target x86_64-my_os.json -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem -- --no-run"
krun = "run --target x86_64-my_os.json -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem"

I am basically following the blog post and, of course, it doesn't work: https://os.phil-opp.com/testing/

iddm avatar Aug 21 '21 09:08 iddm