[snowpatch] [PATCH] Don't retest patches that have already been tested
Russell Currey
ruscur at russell.cc
Wed Apr 20 15:11:32 AEST 2016
Currently when snowpatch is running in endless/daemon mode, once it's
tested all the series it will go back and do it all again. This is a
waste of time and resources, so let's not do that.
If Jenkins tests are once again parallelised, and the Patchwork polling
interval is set to something low, there's a chance that the test state
of a series will not be reported and that something will still be tested
twice. We can deal with that when/if it happens.
Closes: #12 ("'Endless' mode retests series")
Signed-off-by: Russell Currey <ruscur at russell.cc>
---
This might require a fixup or something since it's right next to stuff
touched by the linkname patch.
---
src/main.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main.rs b/src/main.rs
index b18206c..a119067 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -267,6 +267,11 @@ fn main() {
'daemon: loop {
let series_list = patchwork.get_series_query().unwrap().results.unwrap();
for series in series_list {
+ // If it's already been tested, we can skip it
+ if series.test_state.is_some() {
+ continue;
+ }
+
match settings.projects.get(&series.project.name) {
None => continue,
Some(project) => {
--
2.8.0
More information about the snowpatch
mailing list