From patchwork Wed Jan 22 09:54:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 23490 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9CC7D218CB for ; Wed, 22 Jan 2014 10:29:00 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id hu8sf296237vcb.2 for ; Wed, 22 Jan 2014 02:28:59 -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=XHZCoJRBC0Srpj2Mp6+ToFipiBvIIErNJx5ZZyltT94=; b=GgNh4/pI2+dZ0T4vytHaSu2sIh4jVrxTR2E7o+KjQ/ee8DVtlkYXQ+HOTw0pLisktQ n1tmb3XU0M6crIF6tBOD+o94Uo+1e9gXYBYseYvA8RnDX0uD3GiztKII71ifxQbx9MQu PAM7bzFSuikDWQFAGM9hlPUcDY6z73sVm5t6qpEzQPk5isoSiZvMrNGpU/5zyUuOuD6o Ax4Vu/JPKoqRjsshZh8vtLI0yWV0Psi2yzfxtg65iTw6yumeKmXv13wgSa+cRA/PlaO/ aHovSJ9GNwTj4djJJlSH0VaRLlQT/PacdRBfM8fcvCrk57Gwc6GMW4QgS1ZfLezNrVhh kmHA== X-Gm-Message-State: ALoCoQm1d9zqgyxTvu3Adp4+SNMYcrAttM5Kw28JCB2CWbFs0w+koFK6arlWmN0v+WmqfYPjVKct X-Received: by 10.236.128.72 with SMTP id e48mr249668yhi.20.1390386539782; Wed, 22 Jan 2014 02:28:59 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.118 with SMTP id x109ls22709qge.43.gmail; Wed, 22 Jan 2014 02:28:59 -0800 (PST) X-Received: by 10.220.98.143 with SMTP id q15mr354202vcn.38.1390386539684; Wed, 22 Jan 2014 02:28:59 -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 kv9si4262833vec.62.2014.01.22.02.28.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 02:28:59 -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 cz12so104937veb.26 for ; Wed, 22 Jan 2014 02:28:59 -0800 (PST) X-Received: by 10.58.227.38 with SMTP id rx6mr373193vec.10.1390386539608; Wed, 22 Jan 2014 02:28:59 -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 u4csp175268vcz; Wed, 22 Jan 2014 02:28:59 -0800 (PST) X-Received: by 10.50.43.225 with SMTP id z1mr2128554igl.41.1390386538936; Wed, 22 Jan 2014 02:28:58 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id i18si13307414igt.30.2014.01.22.02.28.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Jan 2014 02:28:58 -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 1W5uWu-00074z-3j; Wed, 22 Jan 2014 09:55:28 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W5uWr-0006xB-9B for xen-devel@lists.xen.org; Wed, 22 Jan 2014 09:55:25 +0000 Received: from [85.158.137.68:10285] by server-8.bemta-3.messagelabs.com id 15/1A-31081-A859FD25; Wed, 22 Jan 2014 09:55:22 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-2.tower-31.messagelabs.com!1390384518!10600155!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 32625 invoked from network); 22 Jan 2014 09:55:21 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-2.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 22 Jan 2014 09:55:21 -0000 X-IronPort-AV: E=Sophos;i="4.95,698,1384300800"; d="scan'208";a="93181388" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 22 Jan 2014 09:55:21 +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:20 -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-MC; Wed, 22 Jan 2014 09:55:02 +0000 From: Ian Campbell To: Date: Wed, 22 Jan 2014 09:54:58 +0000 Message-ID: <1390384501-20552-14-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: MIA2 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST 14/17] make-flight: reduce indentation in test_matrix_do_one 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: Now that the body of the multiple nested loops is in a function it doesn't need to be so deeply indented. This wasn't done in the previous patch for clarity. Signed-off-by: Ian Campbell --- make-flight | 198 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/make-flight b/make-flight index 97421f2..177523b 100755 --- a/make-flight +++ b/make-flight @@ -96,24 +96,24 @@ test_matrix_branch_filter_callback () { } test_matrix_do_one () { - if [ $dom0arch = armhf ]; then - job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \ - $xenarch $dom0arch \ - $debian_runvars all_hostflags=$most_hostflags - return - fi + if [ $dom0arch = armhf ]; then + job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \ + $xenarch $dom0arch \ + $debian_runvars all_hostflags=$most_hostflags + return + fi - job_create_test test-$xenarch$kern-$dom0arch-pv test-debian xend \ - $xenarch $dom0arch \ - $debian_runvars all_hostflags=$most_hostflags + job_create_test test-$xenarch$kern-$dom0arch-pv test-debian xend \ + $xenarch $dom0arch \ + $debian_runvars all_hostflags=$most_hostflags - job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \ - $xenarch $dom0arch \ - $debian_runvars all_hostflags=$most_hostflags + job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \ + $xenarch $dom0arch \ + $debian_runvars all_hostflags=$most_hostflags - if [ $xenarch = amd64 -a $dom0arch = i386 -a "$kern" = "" ]; then + if [ $xenarch = amd64 -a $dom0arch = i386 -a "$kern" = "" ]; then - for freebsdarch in amd64 i386; do + for freebsdarch in amd64 i386; do job_create_test test-$xenarch$kern-$dom0arch$qemuu_suffix-freebsd10-$freebsdarch \ test-freebsd xl $xenarch $dom0arch \ @@ -121,124 +121,124 @@ test_matrix_do_one () { freebsd_image=${FREEBSD_IMAGE_PREFIX-FreeBSD-10.0-BETA3-}$freebsdarch${FREEBSD_IMAGE_SUFFIX--20131103-r257580.qcow2.xz} \ all_hostflags=$most_hostflags - done - - fi + done - for qemuu_suffix in '' -qemut -qemuu; do - case "$qemuu_suffix" in - '') - qemuu_runvar='' - ;; - -qemut) - qemuu_runvar=device_model_version=qemu-xen-traditional - ;; - -qemuu) - case $xenbranch in - xen-3.*-testing) continue;; - xen-4.0-testing) continue;; - xen-4.1-testing) continue;; - esac - qemuu_runvar=device_model_version=qemu-xen - ;; - esac + fi - for vcpus in '' 1; do - case "$vcpus" in - '') vcpus_runvars=''; vcpus_suffix='' ;; - *) vcpus_runvars=guests_vcpus=$vcpus; vcpus_suffix=-vcpus$vcpus ;; + for qemuu_suffix in '' -qemut -qemuu; do + case "$qemuu_suffix" in + '') + qemuu_runvar='' + ;; + -qemut) + qemuu_runvar=device_model_version=qemu-xen-traditional + ;; + -qemuu) + case $xenbranch in + xen-3.*-testing) continue;; + xen-4.0-testing) continue;; + xen-4.1-testing) continue;; esac + qemuu_runvar=device_model_version=qemu-xen + ;; + esac - if [ "x$vcpus" = x ] || \ - [ "$xenarch$kern-$dom0arch" = "amd64-i386" ]; then + for vcpus in '' 1; do + case "$vcpus" in + '') vcpus_runvars=''; vcpus_suffix='' ;; + *) vcpus_runvars=guests_vcpus=$vcpus; vcpus_suffix=-vcpus$vcpus ;; + esac - stripy toolstack xend xl \ - "$vcpus" 1 \ - "$kern" '' \ - "$xenarch" i386 \ - "$dom0arch" i386 + if [ "x$vcpus" = x ] || \ + [ "$xenarch$kern-$dom0arch" = "amd64-i386" ]; then - toolstack_runvars="toolstack=$toolstack" + stripy toolstack xend xl \ + "$vcpus" 1 \ + "$kern" '' \ + "$xenarch" i386 \ + "$dom0arch" i386 - job_create_test \ - test-$xenarch$kern-$dom0arch-$toolstack$qemuu_suffix-winxpsp3$vcpus_suffix \ - test-win $toolstack $xenarch $dom0arch $qemuu_runvar \ - win_image=winxpsp3.iso $vcpus_runvars \ - all_hostflags=$most_hostflags,hvm + toolstack_runvars="toolstack=$toolstack" - fi - done + job_create_test \ + test-$xenarch$kern-$dom0arch-$toolstack$qemuu_suffix-winxpsp3$vcpus_suffix \ + test-win $toolstack $xenarch $dom0arch $qemuu_runvar \ + win_image=winxpsp3.iso $vcpus_runvars \ + all_hostflags=$most_hostflags,hvm - if [ $xenarch = amd64 ]; then + fi + done - job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-win7-amd64 \ - test-win xl $xenarch $dom0arch $qemuu_runvar \ - win_image=win7-x64.iso \ - all_hostflags=$most_hostflags,hvm + if [ $xenarch = amd64 ]; then - fi + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-win7-amd64 \ + test-win xl $xenarch $dom0arch $qemuu_runvar \ + win_image=win7-x64.iso \ + all_hostflags=$most_hostflags,hvm + + fi - if [ $xenarch = amd64 -a $dom0arch = i386 -a "$kern" = "" ]; then + if [ $xenarch = amd64 -a $dom0arch = i386 -a "$kern" = "" ]; then - for cpuvendor in amd intel; do + for cpuvendor in amd intel; do job_create_test test-$xenarch$kern-$dom0arch$qemuu_suffix-rhel6hvm-$cpuvendor \ - test-rhelhvm xl $xenarch $dom0arch \ - redhat_image=rhel-server-6.1-i386-dvd.iso \ - all_hostflags=$most_hostflags,hvm-$cpuvendor \ - $qemuu_runvar + test-rhelhvm xl $xenarch $dom0arch \ + redhat_image=rhel-server-6.1-i386-dvd.iso \ + all_hostflags=$most_hostflags,hvm-$cpuvendor \ + $qemuu_runvar - done + done - fi + fi - done # qemuu_suffix + done # qemuu_suffix - job_create_test test-$xenarch$kern-$dom0arch-pair test-pair \ - $onetoolstack $xenarch $dom0arch \ - !host !host_hostflags \ - $debian_runvars \ - all_hostflags=$most_hostflags,equiv-1 + job_create_test test-$xenarch$kern-$dom0arch-pair test-pair \ + $onetoolstack $xenarch $dom0arch \ + !host !host_hostflags \ + $debian_runvars \ + all_hostflags=$most_hostflags,equiv-1 - if [ $xenarch = amd64 -a $dom0arch = amd64 ]; then + if [ $xenarch = amd64 -a $dom0arch = amd64 ]; then - for pin in '' -pin; do + for pin in '' -pin; do - job_create_test test-$xenarch$kern-$dom0arch-xl-sedf$pin \ - test-debian xl $xenarch $dom0arch \ - guests_vcpus=4 xen_boot_append="sched=sedf loglvl=all ${pin:+dom0_vcpus_pin}" linux_boot_append='loglevel=9 debug' \ - $debian_runvars all_hostflags=$most_hostflags + job_create_test test-$xenarch$kern-$dom0arch-xl-sedf$pin \ + test-debian xl $xenarch $dom0arch \ + guests_vcpus=4 xen_boot_append="sched=sedf loglvl=all ${pin:+dom0_vcpus_pin}" linux_boot_append='loglevel=9 debug' \ + $debian_runvars all_hostflags=$most_hostflags - done + done - fi + fi - if [ $xenarch = amd64 -a $dom0arch = i386 ]; then + if [ $xenarch = amd64 -a $dom0arch = i386 ]; then - job_create_test test-$xenarch$kern-$dom0arch-xl-multivcpu \ - test-debian xl $xenarch $dom0arch guests_vcpus=4 \ - $debian_runvars all_hostflags=$most_hostflags + job_create_test test-$xenarch$kern-$dom0arch-xl-multivcpu \ + test-debian xl $xenarch $dom0arch guests_vcpus=4 \ + $debian_runvars all_hostflags=$most_hostflags - job_create_test test-$xenarch$kern-$dom0arch-xl-credit2 \ - test-debian xl $xenarch $dom0arch \ - guests_vcpus=4 xen_boot_append='sched=credit2' \ - $debian_runvars all_hostflags=$most_hostflags + job_create_test test-$xenarch$kern-$dom0arch-xl-credit2 \ + test-debian xl $xenarch $dom0arch \ + guests_vcpus=4 xen_boot_append='sched=credit2' \ + $debian_runvars all_hostflags=$most_hostflags - fi + fi - if [ $xenarch = amd64 -a $dom0arch = amd64 -a "$kern" = "" ]; then + if [ $xenarch = amd64 -a $dom0arch = amd64 -a "$kern" = "" ]; then - for cpuvendor in intel; do + for cpuvendor in intel; do - job_create_test test-$xenarch$kern-$dom0arch-xl-pcipt-intel \ - test-debian-nomigr xl $xenarch $dom0arch \ - guests_vcpus=4 \ - $debian_runvars debian_pcipassthrough_nic=host \ - all_hostflags=$most_hostflags,hvm-$cpuvendor,pcipassthrough-nic + job_create_test test-$xenarch$kern-$dom0arch-xl-pcipt-intel \ + test-debian-nomigr xl $xenarch $dom0arch \ + guests_vcpus=4 \ + $debian_runvars debian_pcipassthrough_nic=host \ + all_hostflags=$most_hostflags,hvm-$cpuvendor,pcipassthrough-nic - done + done - fi + fi } for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do