From patchwork Wed Jan 22 09:54:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 23506 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9F798203C6 for ; Wed, 22 Jan 2014 11:40:56 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id jt11sf555430pbb.10 for ; Wed, 22 Jan 2014 03:40:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=uYqX0/54rEEXm5LP2BPlDWb2DneJ0xPZSuM/c2MddxQ=; b=RWYN0LF1zRhvI8y4T0BMZJHU7l35jbItJfuehc//reqYtZR6IfAcDLOcNqr6NkGORd XpXD54exRVsZfIwPbSRAZzXy9Y7cqfQp4eHl2vDMlxjyDxLhFKpkxXkQImuJp8JFKKUe m9uDZMRSl0aRS6dLBeqkXe5CPaRYZIq32ZngkdWK6Qi1KTmdSj2vfSJsQ2VRwJIJitMt gFOH5JfIy7Z9otTnNNRvmZi0sW7EPM255Gu5SvnGbSV22eKYDZrcP3cqRAfmZMA1jfP7 5cfJA4dU+M70G306x65P7UXE8jYgz672jFprZRsZzD2wBEEhjp1JFRNZqYh5f19cgQi9 AezA== X-Gm-Message-State: ALoCoQm16hOXk6LY1x8xxY77h9Nfd3rr0YVjmUtV//iKaPMI1XYylrvh4JFw/Bi/sjNs5A46oupx X-Received: by 10.67.21.145 with SMTP id hk17mr344121pad.35.1390390855910; Wed, 22 Jan 2014 03:40:55 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.4 with SMTP id js4ls37680qeb.41.gmail; Wed, 22 Jan 2014 03:40:55 -0800 (PST) X-Received: by 10.220.97.145 with SMTP id l17mr160557vcn.35.1390390855784; Wed, 22 Jan 2014 03:40:55 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id c5si4367248vco.144.2014.01.22.03.40.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 03:40:55 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id cz12so145636veb.40 for ; Wed, 22 Jan 2014 03:40:55 -0800 (PST) X-Received: by 10.58.226.163 with SMTP id rt3mr562416vec.34.1390390855630; Wed, 22 Jan 2014 03:40:55 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp178734vcz; Wed, 22 Jan 2014 03:40:55 -0800 (PST) X-Received: by 10.50.50.203 with SMTP id e11mr22780543igo.42.1390390854972; Wed, 22 Jan 2014 03:40:54 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id ay2si13303163icb.66.2014.01.22.03.40.54 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Jan 2014 03:40:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W5uWf-0006fY-8N; Wed, 22 Jan 2014 09:55:13 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W5uWd-0006cC-6a for xen-devel@lists.xen.org; Wed, 22 Jan 2014 09:55:11 +0000 Received: from [85.158.137.68:37056] by server-11.bemta-3.messagelabs.com id 41/0A-19379-E759FD25; Wed, 22 Jan 2014 09:55:10 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-15.tower-31.messagelabs.com!1390384506!6937372!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20198 invoked from network); 22 Jan 2014 09:55:09 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-15.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 22 Jan 2014 09:55:09 -0000 X-IronPort-AV: E=Sophos;i="4.95,698,1384300800"; d="scan'208";a="93181314" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 22 Jan 2014 09:55:08 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Wed, 22 Jan 2014 04:55:08 -0500 Received: from spare.cam.xci-test.com ([10.80.2.80] helo=kazak.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1W5uWU-0005Rs-O0; Wed, 22 Jan 2014 09:55:02 +0000 From: Ian Campbell To: Date: Wed, 22 Jan 2014 09:54:59 +0000 Message-ID: <1390384501-20552-15-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1390384419.32519.32.camel@kazak.uk.xensource.com> References: <1390384419.32519.32.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST 15/17] make-flight: Refactor test matrix iteration into mfi-common X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Ian Campbell --- make-flight | 92 +----------------------------------------------------- mfi-common | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 91 deletions(-) diff --git a/make-flight b/make-flight index 177523b..4a144ec 100755 --- a/make-flight +++ b/make-flight @@ -241,97 +241,7 @@ test_matrix_do_one () { fi } -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 - case "$xenbranch" in - xen-3.*-testing) continue;; - xen-4.0-testing) continue;; - xen-4.1-testing) continue;; - xen-4.2-testing) continue;; - *) ;; - esac - ;; - i386) - # 32-bit Xen is dropped from 4.3 onwards - case "$xenbranch" in - xen-3.*-testing) ;; - xen-4.0-testing) ;; - xen-4.1-testing) ;; - xen-4.2-testing) ;; - *) continue ;; - esac - ;; - amd64) - ;; - esac - - case "$xenarch" in - armhf) suite="wheezy"; guestsuite="wheezy";; - *) suite=$defsuite; guestsuite=$defguestsuite;; - esac - - if [ $suite != $defsuite ] ; then - suite_runvars="host_suite=$suite" - else - suite_runvars= - fi - - case "$xenbranch" in - xen-3.*-testing) onetoolstack=xend ;; - xen-4.0-testing) onetoolstack=xend ;; - xen-4.1-testing) onetoolstack=xend ;; - *) onetoolstack=xl ;; - esac - - for kern in ''; do - - case $kern in - '') - kernbuild=pvops - kernkind=pvops - ;; - *) echo >&2 "kernkind ? $kern"; exit 1 ;; - esac - - for dom0arch in i386 amd64 armhf; do - - case ${xenarch}_${dom0arch} in - amd64_amd64) ;; - amd64_i386) ;; - i386_i386) ;; - armhf_armhf) ;; - *) continue ;; - esac - - eval " - arch_runvars=\"\$ARCH_RUNVARS_$dom0arch\" - " - - debian_runvars="debian_kernkind=$kernkind debian_arch=$dom0arch" - if [ $guestsuite != $defguestsuite ] ; then - debian_runvars="$debian_runvars debian_suite=$guestsuite" - fi - - most_hostflags="arch-$dom0arch,arch-xen-$xenarch,suite-$suite,purpose-test" - - most_runvars=" - arch=$dom0arch \ - kernbuildjob=${bfi}build-$dom0arch-$kernbuild \ - kernkind=$kernkind \ - $arch_runvars $suite_runvars - " - - test_matrix_do_one - done - done -done +test_matrix_iterate echo $flight diff --git a/mfi-common b/mfi-common index 373110b..5529979 100644 --- a/mfi-common +++ b/mfi-common @@ -217,6 +217,107 @@ job_create_test () { xenbuildjob=$xenbuildjob buildjob=$buildjob "$@" } +# Iterate over xenarch, dom0arch and kernel calling test_matrix_do_one +# for each combination. +# +# Filters non-sensical combinations. +# +# Provides various convenience variables for the callback. +# +test_matrix_iterate () { + 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 + case "$xenbranch" in + xen-3.*-testing) continue;; + xen-4.0-testing) continue;; + xen-4.1-testing) continue;; + xen-4.2-testing) continue;; + *) ;; + esac + ;; + i386) + # 32-bit Xen is dropped from 4.3 onwards + case "$xenbranch" in + xen-3.*-testing) ;; + xen-4.0-testing) ;; + xen-4.1-testing) ;; + xen-4.2-testing) ;; + *) continue ;; + esac + ;; + amd64) + ;; + esac + + case "$xenarch" in + armhf) suite="wheezy"; guestsuite="wheezy";; + *) suite=$defsuite; guestsuite=$defguestsuite;; + esac + + if [ $suite != $defsuite ] ; then + suite_runvars="host_suite=$suite" + else + suite_runvars= + fi + + case "$xenbranch" in + xen-3.*-testing) onetoolstack=xend ;; + xen-4.0-testing) onetoolstack=xend ;; + xen-4.1-testing) onetoolstack=xend ;; + *) onetoolstack=xl ;; + esac + + for kern in ''; do + + case $kern in + '') + kernbuild=pvops + kernkind=pvops + ;; + *) echo >&2 "kernkind ? $kern"; exit 1 ;; + esac + + for dom0arch in i386 amd64 armhf; do + + case ${xenarch}_${dom0arch} in + amd64_amd64) ;; + amd64_i386) ;; + i386_i386) ;; + armhf_armhf) ;; + *) continue ;; + esac + + eval " + arch_runvars=\"\$ARCH_RUNVARS_$dom0arch\" + " + + debian_runvars="debian_kernkind=$kernkind debian_arch=$dom0arch" + if [ $guestsuite != $defguestsuite ] ; then + debian_runvars="$debian_runvars debian_suite=$guestsuite" + fi + + most_hostflags="arch-$dom0arch,arch-xen-$xenarch,suite-$suite,purpose-test" + + most_runvars=" + arch=$dom0arch \ + kernbuildjob=${bfi}build-$dom0arch-$kernbuild \ + kernkind=$kernkind \ + $arch_runvars $suite_runvars + " + + test_matrix_do_one + done + done + done +} + # Local variables: # mode: sh # sh-basic-offset: 2