From: Ian Campbell Subject: [PATCH OSSTEST 10/17] make-flight: refactor job_create_test filters Date: Wed, 22 Jan 2014 09:54:54 +0000 Message-ID: <1390384501-20552-10-git-send-email-ian.campbell@citrix.com> References: <1390384419.32519.32.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1390384419.32519.32.camel@kazak.uk.xensource.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: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This will allow job_create_test to be moved mfi-common. No (intentional) change to the set of jobs which are created. Signed-off-by: Ian Campbell --- make-flight | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/make-flight b/make-flight index 7085dc2..34c1ce4 100755 --- a/make-flight +++ b/make-flight @@ -47,7 +47,38 @@ else fi +job_create_test_filter_callback () { + local job=$1; shift + local recipe=$1; shift + local toolstack=$1; shift + local xenarch=$1; shift + local dom0arch=$1; shift + + case "$branch" in + qemu-upstream-*) + case " $* " in + *" device_model_version=qemu-xen "*) + ;; + *) + : "suppressed $job" + return 1;; + esac + ;; + *) + case "$job" in + *-qemuu-*) + if [ "x$toolstack" != xxl ]; then return 1; fi + ;; + esac + ;; + esac + + return 0; +} + job_create_test () { + job_create_test_filter_callback "$@" || return 0 + local job=$1; shift local recipe=$1; shift local toolstack=$1; shift @@ -68,25 +99,6 @@ job_create_test () { ;; esac - case "$branch" in - qemu-upstream-*) - case " $* " in - *" device_model_version=qemu-xen "*) - ;; - *) - : "suppressed $job" - return;; - esac - ;; - *) - case "$job" in - *-qemuu-*) - if [ "x$toolstack" != xxl ]; then return; fi - ;; - esac - ;; - esac - ./cs-job-create $flight $job $recipe toolstack=$toolstack \ $RUNVARS $TEST_RUNVARS $most_runvars \ xenbuildjob=$xenbuildjob buildjob=$buildjob "$@" -- 1.8.5.2