Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo test --quiet passes invalid option --quiet to qemu #94

Open
jasondyoungberg opened this issue Jan 29, 2024 · 1 comment
Open

cargo test --quiet passes invalid option --quiet to qemu #94

jasondyoungberg opened this issue Jan 29, 2024 · 1 comment

Comments

@jasondyoungberg
Copy link

cargo run --quiet works fine, but when I try to run cargo test --quiet, qemu gives the error qemu-system-x86_64: --quiet: invalid option

@orsetii
Copy link

orsetii commented Feb 14, 2024

I believe this occurs due to cargo run consuming the --quiet flag, whereas cargo test --quiet does not consume it, and passes it to the test binary.

See here with a print on the args that bootimage receives with cargo run --quiet:

cargo run --quiet
[src/main.rs:13:5] &raw_args = Args {
    inner: [
        ".../bootimage",
        "runner",
        "target/x86_64-walnut/debug/walnut_os",
    ],
}

and with cargo test --quiet:

cargo test --quiet
[src/main.rs:13:5] &raw_args = Args {
    inner: [
        ".../bootimage",
        "runner",
        "/home/orseti/Source/walnut/walnut_os/target/x86_64-walnut/debug/deps/walnut_os-f71ec98b45354b5e",
        "--quiet",
    ],
}

If you would like to acheive quiet output on all runs and tests, you can do so in your .cargo/config.toml with:

[target.'cfg(target_os = "none")']
runner = "bootimage runner --quiet"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants