From 67730ceedbe231366bf2ad97faf22da8dd915ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 25 Jun 2025 20:56:00 +0200 Subject: xtask: size: Store the expected output same as run --- xtask/src/argument_parsing.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'xtask/src/argument_parsing.rs') diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index ae73782..c8c0368 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -468,7 +468,7 @@ pub enum Commands { /// arguments will be passed on /// /// Example: `cargo xtask size -- -A` - Size(Arg), + Size(ArgsAndOverwrite), /// Run examples in QEMU and compare against expected output /// @@ -562,6 +562,19 @@ pub struct QemuAndRun { pub overwrite_expected: bool, } +#[derive(Debug, Parser, Clone)] +pub struct ArgsAndOverwrite { + /// If expected output is missing or mismatching, recreate the file + /// + /// This overwrites only missing or mismatching + #[arg(long)] + pub overwrite_expected: bool, + + /// Options to pass to `cargo ` + #[command(subcommand)] + pub arguments: Option, +} + #[derive(Debug, Parser, Clone)] pub struct Arg { /// Options to pass to `cargo ` -- cgit v1.2.3