[snowpatch] [PATCH 7/8] Implement sending results to Patchwork for --patch

Andrew Donnellan andrew.donnellan at au1.ibm.com
Mon Jul 23 11:16:12 AEST 2018


On 20/07/18 21:57, Russell Currey wrote:
> Signed-off-by: Russell Currey <ruscur at russell.cc>

Looks good to me

Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

> ---
>   src/main.rs | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/src/main.rs b/src/main.rs
> index 5d34b36..e3b36f2 100644
> --- a/src/main.rs
> +++ b/src/main.rs
> @@ -374,7 +374,16 @@ fn main() {
>               Some(project) => {
>                   let dependencies = patchwork.get_patch_dependencies(&patch);
>                   let mbox = patchwork.get_patches_mbox(dependencies);
> -                test_patch(&settings, &client, project, &mbox, true);
> +                let results = test_patch(&settings, &client, project, &mbox, true);
> +
> +                // Delete the temporary directory with the patch in it
> +                fs::remove_dir_all(mbox.parent().unwrap())
> +                    .unwrap_or_else(|err| error!("Couldn't delete temp directory: {}", err));
> +                if project.push_results {
> +                    for result in results {
> +                        patchwork.post_test_result(result, &patch.checks).unwrap();
> +                    }
> +                }
>               }
>           }
>           return;
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the snowpatch mailing list