rust-osdev / rust-osdev/bootloader

How to run cargo test with the simple_boot example?

Open
#193 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.7k
Forks
240
PR merge metrics
No merged PRs in 30d

Description

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/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .cargo/config aliases shown in the issue, the simple_boot example, and the linked testing blog post. Determine how the project’s cargo test workflow should be documented for this example and target. Done means a newcomer can follow the documented command or configuration successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems, testing-qa
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.