From patchwork Wed Apr 20 05:11:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Currey X-Patchwork-Id: 612478 X-Patchwork-Delegate: andrew.donnellan@au1.ibm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qqVPN44qKz9t4F for ; Wed, 20 Apr 2016 15:12:24 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3qqVPN3KhZzDqMJ for ; Wed, 20 Apr 2016 15:12:24 +1000 (AEST) X-Original-To: snowpatch@lists.ozlabs.org Delivered-To: snowpatch@lists.ozlabs.org Received: from russell.cc (russell.cc [IPv6:2404:9400:2:0:216:3eff:fee0:3370]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3qqVNb69mkzDqKs for ; Wed, 20 Apr 2016 15:11:43 +1000 (AEST) Received: from snap.ozlabs.ibm.com (static-82-10.transact.net.au [122.99.82.10]) by russell.cc (OpenSMTPD) with ESMTPSA id 83c7658c TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=NO; Wed, 20 Apr 2016 05:11:24 +0000 (UTC) From: Russell Currey To: snowpatch@lists.ozlabs.org Date: Wed, 20 Apr 2016 15:11:32 +1000 Message-Id: <1461129092-24748-1-git-send-email-ruscur@russell.cc> X-Mailer: git-send-email 2.8.0 Subject: [snowpatch] [PATCH] Don't retest patches that have already been tested X-BeenThere: snowpatch@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Continuous Integration for patch-based workflows List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell Currey MIME-Version: 1.0 Errors-To: snowpatch-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "snowpatch" 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 --- 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) => {