From patchwork Fri Oct 18 20:52:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ryan S. Arnold" X-Patchwork-Id: 21179 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EF1E02448B for ; Fri, 18 Oct 2013 20:53:41 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf522352obb.2 for ; Fri, 18 Oct 2013 13:53:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=XX0HdCTSEikACrq4zIBRJ2Ut1ArxQa5cdsCfgWSHKLo=; b=Wwr71cPfuXWhbjVPinMaaYRzbtF2DBxSAqo3wkn1oYmqHWObQC873BucF41rEDqcMm gtLXVFiAuXT3Xcqm1Q5+VceCjnBI7QoaxpWrcZuBV2JtwYy9KNHIzCw7bRLQi91VMlWm mMutNafLNwXFjeM5iEbswx3skp4eJZ3P8z7ZRYIRI3ZPeFGFnWFH50yYUtBap3bSqpqE 8pAZGRlnHx1k4LW4zL44oKXh4DhZp5ij/pvUn7gPA0h+G836jl8mvCYBUTVcaJ5nIW3q Xk+buXDN8MMLGoXQ8mDq0yHmw0sZhkCAEtag4znoAYHeVtqh9BBIzMkFLB/ogF0iMuCA ggNw== X-Received: by 10.182.213.5 with SMTP id no5mr1792656obc.15.1382129621580; Fri, 18 Oct 2013 13:53:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.64.38 with SMTP id l6ls1394776qes.89.gmail; Fri, 18 Oct 2013 13:53:41 -0700 (PDT) X-Received: by 10.58.205.195 with SMTP id li3mr125293vec.31.1382129621457; Fri, 18 Oct 2013 13:53:41 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id l1si664829vcl.139.2013.10.18.13.53.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id hu8so615279vcb.14 for ; Fri, 18 Oct 2013 13:53:41 -0700 (PDT) X-Gm-Message-State: ALoCoQkzw2W/XIc2zBynaQZBS96Q+0H6vhiUeqpdm7FpEuIMk1PYzv6LigxWZnIePMw0OnEONzhA X-Received: by 10.58.208.130 with SMTP id me2mr3438614vec.13.1382129621347; Fri, 18 Oct 2013 13:53:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp63331vcz; Fri, 18 Oct 2013 13:53:40 -0700 (PDT) X-Received: by 10.50.111.48 with SMTP id if16mr901547igb.23.1382129620672; Fri, 18 Oct 2013 13:53:40 -0700 (PDT) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by mx.google.com with ESMTPS id mv8si1657816igb.73.2013.10.18.13.53.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.223.176 is neither permitted nor denied by best guess record for domain of ryan.arnold@linaro.org) client-ip=209.85.223.176; Received: by mail-ie0-f176.google.com with SMTP id u16so7231788iet.7 for ; Fri, 18 Oct 2013 13:53:40 -0700 (PDT) X-Received: by 10.42.48.202 with SMTP id t10mr3150019icf.9.1382129620323; Fri, 18 Oct 2013 13:53:40 -0700 (PDT) Received: from badwing.hsd1.mn.comcast.net. (c-71-195-40-9.hsd1.mn.comcast.net. [71.195.40.9]) by mx.google.com with ESMTPSA id cl4sm14877361igc.1.2013.10.18.13.53.39 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2013 13:53:39 -0700 (PDT) From: "Ryan S. Arnold" To: Rob Savoye Cc: patches@linaro.org, "Ryan S. Arnold" Subject: [PATCH][Cbuildv2/get_source 07/17] lib/common.sh: echo ${url} in get_source when finding a successful snapshot match. Date: Fri, 18 Oct 2013 15:52:49 -0500 Message-Id: <1382129579-5777-8-git-send-email-ryan.arnold@linaro.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1382129579-5777-1-git-send-email-ryan.arnold@linaro.org> References: <1382129579-5777-1-git-send-email-ryan.arnold@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ryan.arnold@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: "Ryan S. Arnold" Also move immediate successful snapshot match return 0 into an else leg so that non-matches don't cascade erroneously to success without a match. --- lib/common.sh | 10 +++++++--- testsuite/test.sh | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index 1fcc06b..80f5fe9 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -369,6 +369,8 @@ get_source() snapshot=`find_snapshot $1` if test $? -gt 0; then if test x"${interactive}" = x"yes"; then + # TODO: Add a testcase for this leg, conditional on + # interactive. echo "Pick a unique snapshot name from this list: " 1>&2 for i in ${snapshot}; do echo " $i" 1>&2 @@ -381,7 +383,7 @@ get_source() # If there is a config file for this toolchain component, # see if it has a latest version set. If so, we use that. if test x"${latest}" != x; then - fixme "explicit snapshot listed in latest." 1>&2 + # TODO: Add a testcase for this leg. local url=`find_snapshot ${latest}` return $? fi @@ -397,10 +399,12 @@ get_source() return 1 fi fi + else + echo ${snapshot} + return 0 fi - local url=${snapshot} - return 0 else + # TODO: Add a testcase for this leg? if test `echo $1 | egrep -c "\.git"` -eq 0; then local url=$1 return 0 diff --git a/testsuite/test.sh b/testsuite/test.sh index 37b0f2a..7013830 100755 --- a/testsuite/test.sh +++ b/testsuite/test.sh @@ -374,6 +374,8 @@ fi # ---------------------------------------------------------------------------------- +echo "========= create_release_tag() tests ============" + date="`date +%Y%m%d`" in="gcc.git/gcc-4.8-branch@12345abcde" out="`create_release_tag ${in} | grep -v TRACE`"