From: Ian Campbell Subject: [PATCH OSSTEST 4/5] make-flight: consolidate branch_filter_callback for builds and tests Date: Tue, 17 Nov 2015 17:13:45 +0000 Message-ID: <1447780426-4286-4-git-send-email-ian.campbell@citrix.com> References: <1447780393.301.51.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1447780393.301.51.camel@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: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Currently we have a test_matrix_branch_filter_callback which filters jobs based on the $xenarch and $branch and a separate more adhoc filter inline for the build jobs. This has lead to things getting out of sync in the past (e.g. recently we dropped armhf tests from the linux-3.10 and -3.14 branches but not the build jobs). Add a new build_matrix_branch_filter_callback and for make-flight cause this and test_matrix_branch_filter_callback to use a common helper. The adhoc filtering in the build loop remains and will be tidied up next. For make-distros-flight just add a nop build filter alongside the test filter. No change to the output of standalone-generate-dump-flight-runvars. Signed-off-by: Ian Campbell --- make-distros-flight | 4 ++++ make-flight | 14 ++++++++++++-- mfi-common | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/make-distros-flight b/make-distros-flight index 9e1d77e..9d04d3b 100755 --- a/make-distros-flight +++ b/make-distros-flight @@ -55,6 +55,10 @@ job_create_test_filter_callback () { return 0 } +build_matrix_branch_filter_callback () { + : +} + test_matrix_branch_filter_callback () { : } diff --git a/make-flight b/make-flight index 5d8284a..8febb9f 100755 --- a/make-flight +++ b/make-flight @@ -133,8 +133,9 @@ job_create_test_filter_callback () { return 0; } -test_matrix_branch_filter_callback () { - case "$xenarch" in +arch_branch_filter_callback () { + local arch=$1 + case "$arch" in armhf) case "$branch" in linux-3.0) return 1;; @@ -154,7 +155,16 @@ test_matrix_branch_filter_callback () { esac ;; esac + return 0 +} +build_matrix_branch_filter_callback () { + if ! arch_branch_filter_callback $arch ; then return 1 ; fi + return 0 +} + +test_matrix_branch_filter_callback () { + if ! arch_branch_filter_callback $xenarch ; then return 1 ; fi return 0 } diff --git a/mfi-common b/mfi-common index 3463430..44cd13b 100644 --- a/mfi-common +++ b/mfi-common @@ -89,6 +89,8 @@ create_build_jobs () { if [ "x$arch" = xdisable ]; then continue; fi + build_matrix_branch_filter_callback || continue + case "$arch" in armhf) case "$branch" in -- 2.6.1