diff mbox series

main: Post test result when using --patch

Message ID 20190606095903.17290-1-ajd@linux.ibm.com
State Accepted
Delegated to: Russell Currey
Headers show
Series main: Post test result when using --patch | expand

Commit Message

Andrew Donnellan June 6, 2019, 9:59 a.m. UTC
For some reason, we weren't posting test results when invoked with --patch
rather than --series. Fix this.

Closes: #57 ("Post test result when using --patch")
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>

---

completely untested
---
 src/main.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Andrew Donnellan July 9, 2019, 3:55 a.m. UTC | #1
On 6/6/19 7:59 pm, Andrew Donnellan wrote:
> For some reason, we weren't posting test results when invoked with --patch
> rather than --series. Fix this.
> 
> Closes: #57 ("Post test result when using --patch")
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>

Applied to master: 9ae86e7279b2fd18787291c4a65035c2304cec34
diff mbox series

Patch

diff --git a/src/main.rs b/src/main.rs
index 5ec0c37b2d7f..c3c128faeb6f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -398,7 +398,12 @@  fn run() -> Result<(), Box<Error>> {
                 } else {
                     patchwork.get_patch_mbox(&patch)
                 };
-                test_patch(&settings, &client, &project, &mbox, true);
+                let results = test_patch(&settings, &client, &project, &mbox, true);
+                if project.push_results {
+                    for result in results {
+                        patchwork.post_test_result(&result, &patch.checks).unwrap();
+                    }
+                }
             }
         }
         return Ok(());