From patchwork Fri Oct 18 20:52:45 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: 21175 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 607A22448B for ; Fri, 18 Oct 2013 20:53:37 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id uy5sf6694714obc.7 for ; Fri, 18 Oct 2013 13:53:37 -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=igeStk0j1XCx2zXj+V7HQMgmE9vrod6abvyMHnaiYqU=; b=d6vXTb6EB5//f7f22OfRBUWoX5HIUtVExri5ZXbyLUF90rbnrFCBRSj86vbNw1pRtw +F5964VO5y0dwUcMiPnnOtyZZml73h0BjWmMPKbff9ztHO7O/Olf720JsDo+895wcHz5 gVEDCVkpuMPiRvf0jh0qodDWESwwkOnLzwen2PmD8TiLn/FPD9re8Wz7bLk5YBVXwnZz BVrMMnlL8v445hmEVMWeTKqRP3ZVxwjMPPnhqwiB7TJv1G9Dr6bLoznpPwSoeLP2Baky O1DPoUGDh1Ro8JcOuJKPbKh805YwurRv57ttIsQt0FR20RmNQd3W/ankH1+BCMIZgKEw VNaw== X-Received: by 10.182.109.137 with SMTP id hs9mr1786493obb.21.1382129616950; Fri, 18 Oct 2013 13:53:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.67 with SMTP id eo3ls1408835qeb.41.gmail; Fri, 18 Oct 2013 13:53:36 -0700 (PDT) X-Received: by 10.58.11.73 with SMTP id o9mr3428505veb.8.1382129616805; Fri, 18 Oct 2013 13:53:36 -0700 (PDT) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id wp10si676179vdb.19.2013.10.18.13.53.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.49 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.49; Received: by mail-vb0-f49.google.com with SMTP id w16so2100396vbb.22 for ; Fri, 18 Oct 2013 13:53:36 -0700 (PDT) X-Gm-Message-State: ALoCoQnfBRlBY6IJ6W3h3U8wQIo3rzyLqZEKLp5/fNCA0hdyC6o6rfb0Pxx5OBqWJ5GCgeiQUZLO X-Received: by 10.58.254.200 with SMTP id ak8mr3498627ved.12.1382129616669; Fri, 18 Oct 2013 13:53:36 -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 u4csp63326vcz; Fri, 18 Oct 2013 13:53:36 -0700 (PDT) X-Received: by 10.50.13.9 with SMTP id d9mr898291igc.25.1382129616044; Fri, 18 Oct 2013 13:53:36 -0700 (PDT) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx.google.com with ESMTPS id yx5si173663icb.39.2013.10.18.13.53.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.223.178 is neither permitted nor denied by best guess record for domain of ryan.arnold@linaro.org) client-ip=209.85.223.178; Received: by mail-ie0-f178.google.com with SMTP id to1so10026911ieb.9 for ; Fri, 18 Oct 2013 13:53:35 -0700 (PDT) X-Received: by 10.50.13.9 with SMTP id d9mr898266igc.25.1382129615607; Fri, 18 Oct 2013 13:53:35 -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.34 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2013 13:53:35 -0700 (PDT) From: "Ryan S. Arnold" To: Rob Savoye Cc: patches@linaro.org, "Ryan S. Arnold" Subject: [PATCH][Cbuildv2/get_source 03/17] testsuite/test.sh: Suppress stderr noise and add new failing get_source tests. Date: Fri, 18 Oct 2013 15:52:45 -0500 Message-Id: <1382129579-5777-4-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.212.49 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" The change to make all trace/error/fix/warning message go to stderr rather than stdout has made the testcases kind of noisy. Use 2>/dev/null to suppress unnecessary stderr output in test cases where it doesn't matter. Other tests which need to check the error output simply redirect stderr to stdout for the purpose of the test. --- testsuite/test.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/testsuite/test.sh b/testsuite/test.sh index 92e1c76..3859c0e 100755 --- a/testsuite/test.sh +++ b/testsuite/test.sh @@ -159,7 +159,7 @@ fi # ---------------------------------------------------------------------------------- echo "============= fetch() tests ================" -out="`fetch md5sums`" +out="`fetch md5sums 2>/dev/null`" if test $? -eq 0; then pass "fetch md5sums" else @@ -167,7 +167,7 @@ else fi # Fetching again to test the .bak functionality. -out="`fetch md5sums`" +out="`fetch md5sums 2>/dev/null`" if test $? -eq 0; then pass "fetch md5sums" else @@ -188,7 +188,7 @@ fi # ---------------------------------------------------------------------------------- echo "============= find_snapshot() tests ================" -out="`find_snapshot gcc`" +out="`find_snapshot gcc 2>/dev/null`" if test $? -eq 1; then pass "find_snapshot: not unique tarball name" else @@ -204,7 +204,7 @@ else fixme "find_snapshot returned ${out}" fi -out="`find_snapshot gcc-linaro-4.8-2013.06XXX`" +out="`find_snapshot gcc-linaro-4.8-2013.06XXX 2>/dev/null`" if test $? -eq 1; then pass "find_snapshot: unknown tarball name" else @@ -215,7 +215,8 @@ fi # ---------------------------------------------------------------------------------- echo "============= get_URL() tests ================" -out="`get_URL gcc`" +# This will dump an error to stderr, so squelch it. +out="`get_URL gcc 2>/dev/null`" if test $? -eq 1; then pass "get_URL: not unique in repository" else @@ -239,6 +240,14 @@ else fixme "get_URL returned ${out}" fi +out="`get_URL gcc.git`" +if test x"`echo ${out} | cut -d ' ' -f 1`" = x"git://git.linaro.org/toolchain/gcc.git"; then + pass "get_URL: git URL with no branch or revision info" +else + fail "get_URL: git URL with no branch or revision info" + fixme "get_URL returned ${out}" +fi + out="`get_URL gcc.git/linaro-4.8-branch@12345`" if test x"`echo ${out} | cut -d ' ' -f 1`" = x"git://git.linaro.org/toolchain/gcc.git"; then pass "get_URL: git URL in latest field" @@ -300,9 +309,36 @@ fi echo "============= get_source() tests ================" # Test get_source with a variety of inputs +in="asdfasdf" +out="`get_source ${in} 2>&1`" +if test $? -eq 1; then + pass "get_source: unknown repository" +else + fail "get_source: unknown repository" + fixme "get_source returned \"${out}\"" +fi + +in='' +out="`get_source ${in} 2>/dev/null`" +if test $? -eq 1; then + pass "get_source: empty url" +else + fail "get_source: empty url" + fixme "get_source returned \"${out}\"" +fi + +in="eglibc.git" +out="`get_source ${in}`" +if test x"${out}" = x"git://git.linaro.org/toolchain/eglibc.git"; then + pass "get_source: git repository" +else + fail "get_source: git repository" + fixme "get_source returned ${out}" +fi + in="eglibc.git/linaro_eglibc-2_17" out="`get_source ${in}`" -if test x"${out}" = x"git://git.linaro.org/toolchain/eglibc.git linaro_eglibc-2_17 "; then +if test x"${out}" = x"git://git.linaro.org/toolchain/eglibc.git linaro_eglibc-2_17"; then pass "get_source: git repository with branch" else fail "get_source: git repository with branch" @@ -318,6 +354,16 @@ else fixme "get_source returned ${out}" fi +in="gcc-linaro-4.8-2013.05.tar.bz2" +out="`get_source ${in}`" +if test x"${out}" = x"gcc-linaro-4.8-2013.05.tar.bz2"; then + pass "get_source: tar.bz2 archive" +else + fail "get_source: tar.bz2 archive" + fixme "get_source returned \"${out}\"" +fi + + # ---------------------------------------------------------------------------------- date="`date +%Y%m%d`"