diff --git a/tools/kani-cov/src/args.rs b/tools/kani-cov/src/args.rs index 16aade953c82..2621063349f7 100644 --- a/tools/kani-cov/src/args.rs +++ b/tools/kani-cov/src/args.rs @@ -11,7 +11,7 @@ use crate::{merge, summary, report}; #[derive(Debug, clap::Subcommand)] pub enum Subcommand { Merge(MergeArgs), - // Summary(SummaryArgs), + Summary(SummaryArgs), // Report(ReportArgs), } @@ -38,6 +38,14 @@ pub struct MergeArgs { pub files: Vec, } +#[derive(Debug, clap::Args)] +pub struct SummaryArgs { + #[arg(required = true)] + pub profile: Vec, + #[arg(required = true)] + pub output: Option, +} + pub fn validate_args(args: &Args) -> Result<()> { if args.command.is_none() { bail!("subcommand needs to be specified") @@ -45,7 +53,7 @@ pub fn validate_args(args: &Args) -> Result<()> { match args.command.as_ref().unwrap() { Subcommand::Merge(merge_args) => merge::validate_merge_args(&merge_args)?, - // Subcommand::Summary => summary::validate_summary_args(args)?, + Subcommand::Summary(summary_args) => summary::validate_summary_args(&summary_args)?, // Subcommand::Report => report::validate_report_args(args)?, }; diff --git a/tools/kani-cov/src/summary.rs b/tools/kani-cov/src/summary.rs index e23e7281b163..60afabfecb5a 100644 --- a/tools/kani-cov/src/summary.rs +++ b/tools/kani-cov/src/summary.rs @@ -3,6 +3,12 @@ use anyhow::Result; -pub fn summary_main() -> Result<()> { +use crate::args::SummaryArgs; + +pub fn summary_main(_args: &SummaryArgs) -> Result<()> { + Ok(()) +} + +pub fn validate_summary_args(_args: &SummaryArgs) -> Result<()> { Ok(()) }