cargo test --quiet passes invalid option --quiet to qemu
jasondyoungberg opened this issue · 1 comments
jasondyoungberg commented
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 commented
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"