From patchwork Wed Jan 22 09:54:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 23508 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f197.google.com (mail-gg0-f197.google.com [209.85.161.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7038F203C6 for ; Wed, 22 Jan 2014 11:42:00 +0000 (UTC) Received: by mail-gg0-f197.google.com with SMTP id q3sf14556372gge.4 for ; Wed, 22 Jan 2014 03:41: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=1gHp5D0zdqvQ8aFVF3TGAX9r245wwAM9aqPYrecfoEg=; b=YHd3GLOt5yHzYyuo68i6frHH8vbmUoER3m/fIsHSZE6//HpUG48dI7s29XwMsoeA/g pug4m48Wtmg5vU+fZRA74MfpFtXxfsbT6lBXLd2MfIf8MX22VDkBxrf43vY6OKOxTUgH EUpnlrQhZYTeRrwDy18UEffGvMgNrkkhG73XZwody0lTdAliTWleYwoJoZFT1RdassDW XrEPdZLB2yInnkMRPYWsf5rnOZOo1OevvFcnJSG3kHWLNSI56quQVXFtEDI2JK6b83RW OQDEPewWSdUD6mxDQBWQHd2blnR7hMvTKAehNyrCREsGuCsb8xbH2xN6XIeUnj7pQP0d znDQ== X-Gm-Message-State: ALoCoQlOEa6J5dLn6SoV6O24RTGlTqE8zQgz5Lkx4lPWoUY5/InoPiKiyzDv9ReC739GiORYPTwm X-Received: by 10.236.133.82 with SMTP id p58mr270507yhi.37.1390390919621; Wed, 22 Jan 2014 03:41:59 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.119 with SMTP id 110ls43615qgw.28.gmail; Wed, 22 Jan 2014 03:41:59 -0800 (PST) X-Received: by 10.58.86.230 with SMTP id s6mr569010vez.16.1390390919530; Wed, 22 Jan 2014 03:41:59 -0800 (PST) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id n17si4378679vcq.60.2014.01.22.03.41.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 03:41:59 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id p14so143338vbm.11 for ; Wed, 22 Jan 2014 03:41:59 -0800 (PST) X-Received: by 10.58.100.100 with SMTP id ex4mr579107veb.2.1390390919441; Wed, 22 Jan 2014 03:41: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 u4csp178780vcz; Wed, 22 Jan 2014 03:41:59 -0800 (PST) X-Received: by 10.43.64.73 with SMTP id xh9mr110972icb.78.1390390918573; Wed, 22 Jan 2014 03:41:58 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id jw5si6085336icc.133.2014.01.22.03.41.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Jan 2014 03:41: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 1W5uWb-0006ae-39; Wed, 22 Jan 2014 09:55:09 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W5uWZ-0006ZX-8u for xen-devel@lists.xen.org; Wed, 22 Jan 2014 09:55:07 +0000 Received: from [85.158.139.211:7356] by server-8.bemta-5.messagelabs.com id 96/D9-29838-A759FD25; Wed, 22 Jan 2014 09:55:06 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1390384504!11231652!1 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 1947 invoked from network); 22 Jan 2014 09:55:05 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-10.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 22 Jan 2014 09:55:05 -0000 X-IronPort-AV: E=Sophos;i="4.95,698,1384300800"; d="scan'208";a="93181283" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 22 Jan 2014 09:55:02 +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:02 -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 1W5uWT-0005Rs-Ee; Wed, 22 Jan 2014 09:55:01 +0000 From: Ian Campbell To: Date: Wed, 22 Jan 2014 09:54:46 +0000 Message-ID: <1390384501-20552-2-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 02/17] make-flight: refactor common function "stripy" into helper library 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.212.52 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: Will be useful for other make-flight variants. Signed-off-by: Ian Campbell --- make-flight | 18 +----------------- mfi-common | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 mfi-common diff --git a/make-flight b/make-flight index ddd4427..fdde3af 100755 --- a/make-flight +++ b/make-flight @@ -28,6 +28,7 @@ flight=`./cs-flight-create $blessing $branch` . ap-common . cri-common +. mfi-common defsuite=`getconfig DebianSuite` defguestsuite=`getconfig GuestDebianSuite` @@ -208,23 +209,6 @@ else fi -stripy () { - local out_vn="$1"; shift - local out_0="$1"; shift - local out_1="$1"; shift - local out_val=0 - local this_val - local this_cmp - while [ $# != 0 ]; do - this_val="$1"; shift - this_cmp="$1"; shift - if [ "x$this_val" = "x$this_cmp" ]; then - out_val=$(( $out_val ^ 1 )) - fi - done - eval "$out_vn=\"\$out_$out_val\"" -} - job_create_test () { local job=$1; shift local recipe=$1; shift diff --git a/mfi-common b/mfi-common new file mode 100644 index 0000000..ec0beca --- /dev/null +++ b/mfi-common @@ -0,0 +1,38 @@ +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2009-2014 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +stripy () { + local out_vn="$1"; shift + local out_0="$1"; shift + local out_1="$1"; shift + local out_val=0 + local this_val + local this_cmp + while [ $# != 0 ]; do + this_val="$1"; shift + this_cmp="$1"; shift + if [ "x$this_val" = "x$this_cmp" ]; then + out_val=$(( $out_val ^ 1 )) + fi + done + eval "$out_vn=\"\$out_$out_val\"" +} + +# Local variables: +# mode: sh +# sh-basic-offset: 2 +# indent-tabs-mode: nil +# End: