diff mbox

[Xen-devel,OSSTEST,12/17] make-flight: refactor test case filter over $branch

Message ID 1390384501-20552-12-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell Jan. 22, 2014, 9:54 a.m. UTC
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 make-flight | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)
diff mbox

Patch

diff --git a/make-flight b/make-flight
index 8862be5..e1b65b2 100755
--- a/make-flight
+++ b/make-flight
@@ -76,10 +76,31 @@  job_create_test_filter_callback () {
   return 0;
 }
 
+test_matrix_branch_filter_callback () {
+  case "$xenarch" in
+  armhf)
+        case "$branch" in
+        linux-arm-xen) ;;
+        linux-*) return 1;;
+        qemu-*) return 1;;
+        esac
+        ;;
+  i386|amd64)
+        case "$branch" in
+        linux-arm-xen) return 1;;
+        esac
+        ;;
+  esac
+
+  return 0
+}
+
 for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
 
   if [ "x$xenarch" = xdisable ]; then continue; fi
 
+  test_matrix_branch_filter_callback || continue
+
   case "$xenarch" in
   armhf)
         # Arm from 4.3 onwards only
@@ -90,11 +111,6 @@  for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
         xen-4.2-testing) continue;;
         *) ;;
         esac
-        case "$branch" in
-        linux-arm-xen) ;;
-        linux-*) continue;;
-        qemu-*) continue;;
-        esac
         ;;
   i386)
         # 32-bit Xen is dropped from 4.3 onwards
@@ -105,14 +121,9 @@  for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
         xen-4.2-testing) ;;
         *) continue ;;
         esac
-        case "$branch" in
-        linux-arm-xen) continue;;
-        esac
         ;;
   amd64)
-        case "$branch" in
-        linux-arm-xen) continue;;
-        esac
+        ;;
   esac
 
   case "$xenarch" in