From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 20/27] make-flight: Allow separate specification of pre-built Xen vs others Date: Wed, 16 Sep 2015 14:35:23 +0100 Message-ID: <1442410530-9665-21-git-send-email-ian.jackson@eu.citrix.com> References: <1442410530-9665-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZcCsF-0000d5-Ro for xen-devel@lists.xenproject.org; Wed, 16 Sep 2015 13:35:47 +0000 In-Reply-To: <1442410530-9665-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Make it possible to separately specify - reuse previous flight's builds of xen.git - reuse previous flight's builds of all other stuff Specifically: * Match the 4th argument to make-flight with case rather than if. If it contains a slash, the first part is for Xen and the second part for everything else. * Split the variable `bfi' into `bfi' and `xenbfi' * Introduce job_create_build_filter_callback, whose initial contents check the recipe (to see what we're building) and then the relevant bfi variable. (NB that this is wrong for historical kernel builds using the xen.git build system, which have recipe=build, but we do not care about that.) No functional change for existing call patterns. Signed-off-by: Ian Jackson --- make-flight | 30 +++++++++++++++++++++++------- mfi-common | 4 ++-- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/make-flight b/make-flight index 00f797e..6db3550 100755 --- a/make-flight +++ b/make-flight @@ -22,7 +22,7 @@ set -e branch=$1 xenbranch=$2 blessing=$3 -buildflight=$4 +buildflight=$4 # can be [/] flight=`./cs-flight-create $blessing $branch` @@ -35,18 +35,34 @@ defsuite=`getconfig DebianSuite` defguestsuite=`getconfig GuestDebianSuite` job_create_build_filter_callback () { - : -} + local job=$1; shift + local recipe=$1; shift -if [ x$buildflight = x ]; then + local relevant_bfi - create_build_jobs + case "$recipe" in + build) relevant_bfi=$xenbfi ;; + *) relevant_bfi=$bfi ;; + esac + if [ "x$relevant_bfi" != x ]; then return 1; fi # reusing -else + return 0 +} +case "$buildflight" in +'') + ;; +*/*) + bfi=${buildflight#*/}; bfi=$bfi${bfi:+.} + xenbfi=${buildflight%%/*}; xenbfi=$xenbfi${xenbfi:+.} + ;; +*) bfi=$buildflight. + xenbfi=$buildflight. # applies to `buildjob' and `xenbuildjob' + ;; +esac -fi +create_build_jobs job_create_test_filter_callback () { local job=$1; shift diff --git a/mfi-common b/mfi-common index aaaeac9..af98f2d 100644 --- a/mfi-common +++ b/mfi-common @@ -325,8 +325,8 @@ job_create_test () { esac job="$job$xsm_suffix" - xenbuildjob="${bfi}build-$xenarch$xsm_suffix" - buildjob="${bfi}build-$dom0arch$xsm_suffix" + xenbuildjob="${xenbfi}build-$xenarch$xsm_suffix" + buildjob="${xenbfi}build-$dom0arch$xsm_suffix" tsbuildjob= case "$xenbranch:$toolstack" in -- 1.7.10.4