[snowpatch] [PATCH 7/8] Implement sending results to Patchwork for --patch
Russell Currey
ruscur at russell.cc
Fri Jul 20 21:57:27 AEST 2018
Signed-off-by: Russell Currey <ruscur at russell.cc>
---
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;
--
2.17.1
More information about the snowpatch
mailing list