Commit c32ad20f authored by David Brown's avatar David Brown Committed by David Brown
Browse files

ptest: Add workflow argument



Allow the `--workflow` argument to override the workflow file that is used, with
a reasonable default of the workflow used by CI.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 87983379
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ fn main() -> Result<()> {
        Commands::Run => (),
    }

    let workflow_text = fs::read_to_string("../.github/workflows/sim.yaml")?;
    let workflow_text = fs::read_to_string(&args.workflow)?;
    let workflow = YamlLoader::load_from_str(&workflow_text)?;

    let ncpus = num_cpus::get();
@@ -88,6 +88,10 @@ fn main() -> Result<()> {
#[command(name = "ptest")]
#[command(about = "Run MCUboot CI tests stand alone")]
struct Cli {
    /// The workflow file to use.
    #[arg(short, long, default_value = "../.github/workflows/sim.yaml")]
    workflow: String,

    #[command(subcommand)]
    command: Commands,
}