From patchwork Thu May 15 10:30:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 30244 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f71.google.com (mail-qg0-f71.google.com [209.85.192.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6760E202E6 for ; Thu, 15 May 2014 10:31:50 +0000 (UTC) Received: by mail-qg0-f71.google.com with SMTP id a108sf2038334qge.10 for ; Thu, 15 May 2014 03:31:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=Xm9WxXLZsXj32aOVpSEpPMycsUqopLIQ52/azmSONAE=; b=hr44ShQO8VLzWnGK6q15kCTK41fgbn8EigMBPm6j9McLNaFfmISvJqNmodr+DbcmQs 6Zkwnx3CMPkx5323XcuyfVlNDsR06NuwmZjfLHs2GhFh3lhfzTiSDUUhknC0VvIt63HZ 8tVTQ+JN8uqLABDstRdSCDP+Gq+07hjXs7J6UyirMUPDXFTUL3GDExLLNurA1YkK5HNf c7+AZ0PHCvympAdX5/nqCkwSPEHDjMJgmxqVbxw/U6iV4ZTZwD9LzB/q7Mk8J69mMn2c tGtOYXOLcMPm7/VAbmnXU0yXWIGLcwE3hiPBBkvENGxU4yA6baRGpRt2Wz0gRmrCuK1n et+w== X-Gm-Message-State: ALoCoQkLfrjMj6u60lL+LbEB3adP5N5/7lUXq+nk2XGnsg+WoxyaMj1s5dOdDDAVsfoBtFm3VSh3 X-Received: by 10.236.89.114 with SMTP id b78mr4001482yhf.13.1400149910195; Thu, 15 May 2014 03:31:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.145 with SMTP id g17ls188424qge.76.gmail; Thu, 15 May 2014 03:31:50 -0700 (PDT) X-Received: by 10.52.153.229 with SMTP id vj5mr1193231vdb.34.1400149910037; Thu, 15 May 2014 03:31:50 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id aw3si107107vdd.129.2014.05.15.03.31.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 May 2014 03:31:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id oz11so1005617veb.17 for ; Thu, 15 May 2014 03:31:50 -0700 (PDT) X-Received: by 10.52.116.101 with SMTP id jv5mr6705438vdb.11.1400149909936; Thu, 15 May 2014 03:31:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp310913vcb; Thu, 15 May 2014 03:31:49 -0700 (PDT) X-Received: by 10.224.65.130 with SMTP id j2mr11664056qai.31.1400149909347; Thu, 15 May 2014 03:31:49 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id g4si2310427qai.120.2014.05.15.03.31.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 15 May 2014 03:31:49 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wksw6-0001hY-Fa; Thu, 15 May 2014 10:30:50 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wksw5-0001hA-DB for xen-devel@lists.xen.org; Thu, 15 May 2014 10:30:49 +0000 Received: from [85.158.143.35:36947] by server-1.bemta-4.messagelabs.com id 29/8D-09853-85794735; Thu, 15 May 2014 10:30:48 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-16.tower-21.messagelabs.com!1400149844!1672768!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12866 invoked from network); 15 May 2014 10:30:47 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-16.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 15 May 2014 10:30:47 -0000 X-IronPort-AV: E=Sophos; i="4.97,1058,1389744000"; d="scan'208"; a="131418040" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 15 May 2014 10:30:47 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.3.181.6; Thu, 15 May 2014 06:30:45 -0400 Received: from kazak.uk.xensource.com ([10.80.2.80] helo=zakaz.uk.xensource.com) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1Wksw0-0005kc-Ky; Thu, 15 May 2014 11:30:45 +0100 Received: by zakaz.uk.xensource.com (sSMTP sendmail emulation); Thu, 15 May 2014 11:30:44 +0100 From: Ian Campbell To: , Date: Thu, 15 May 2014 11:30:39 +0100 Message-ID: <1400149839-8489-6-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1400149787.4386.29.camel@kazak.uk.xensource.com> References: <1400149787.4386.29.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell Subject: [Xen-devel] [PATCH OSSTEST v3 6/6] sg-run-job: check for prerequisite builds when running build jobs X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: For example build-$ARCH-libvirt depends on build-$ARCH for the Xen bits. Performing this check early saves allocating, installing, preparating etc a host just to find the prerequisite is missing. Rename ts-xen-build-check to ts-build-check while we are there. The script checks all prerequisite builds, not just Xen. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- sg-run-job | 6 ++++-- ts-build-check | 37 +++++++++++++++++++++++++++++++++++++ ts-xen-build-check | 37 ------------------------------------- 3 files changed, 41 insertions(+), 39 deletions(-) create mode 100755 ts-build-check delete mode 100755 ts-xen-build-check diff --git a/sg-run-job b/sg-run-job index 560fead..13f2c70 100755 --- a/sg-run-job +++ b/sg-run-job @@ -87,7 +87,7 @@ proc catching-otherwise {failst script} { } proc check-not-blocked {} { - run-ts blocked * ts-xen-build-check + run-ts blocked * ts-build-check } proc setstatus {st} { @@ -327,7 +327,9 @@ proc run-job/build-libvirt {} { } proc prepare-build-host {} { - global jobinfo + global jobinfo ok + catching-otherwise blocked check-not-blocked + if {!$ok} return run-ts broken = ts-hosts-allocate + host run-ts broken host-install(*) ts-host-install-twice run-ts . host-build-prep ts-xen-build-prep diff --git a/ts-build-check b/ts-build-check new file mode 100755 index 0000000..0ae3be8 --- /dev/null +++ b/ts-build-check @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2009-2013 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +use Osstest; +use Osstest::TestSupport; + +tsreadconfig(); + +die if @ARGV && $ARGV[0] =~ m/^-/; + +logm("checking builds ..."); + +foreach my $k (sort keys %r) { + next unless $k =~ m/^(?:.*_)?([^_]*)buildjob$/; + my $part= $1; + my $path= "path_${part}dist"; + logm("checking $k $path"); + get_stashed($path, $r{$k}); +} + +logm("all ok."); + +exit 0; diff --git a/ts-xen-build-check b/ts-xen-build-check deleted file mode 100755 index 0ae3be8..0000000 --- a/ts-xen-build-check +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl -w -# This is part of "osstest", an automated testing framework for Xen. -# Copyright (C) 2009-2013 Citrix Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -use Osstest; -use Osstest::TestSupport; - -tsreadconfig(); - -die if @ARGV && $ARGV[0] =~ m/^-/; - -logm("checking builds ..."); - -foreach my $k (sort keys %r) { - next unless $k =~ m/^(?:.*_)?([^_]*)buildjob$/; - my $part= $1; - my $path= "path_${part}dist"; - logm("checking $k $path"); - get_stashed($path, $r{$k}); -} - -logm("all ok."); - -exit 0;