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 <ian.jack...@eu.citrix.com> --- 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 [<xen.git-build-flight>/<general-build-flight>] 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel