From patchwork Fri Oct 11 20:12:18 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: 20987 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A4F62611D for ; Fri, 11 Oct 2013 20:12:57 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id qd12sf3222626ieb.6 for ; Fri, 11 Oct 2013 13:12:57 -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=rM1KO/9ro5o2JrH+eLMDNuXEr6xjVVy9ab3ZLBGr+oc=; b=W6WkkrYsitCDSahPTygWOaoeEtXWIabjXRoZVI4qaWZ3jerZ35rRMHL95M5mTOW9xz Ltfk10WlSGfYutP1tEc7U5svaApK13bTz5fCAvDsFmiLDyXHspTxNoniOgfCbp6jci9S yWLJz8HQyPXCRe7UMF9cF/rtYgmwNUGx0GyA4Iqsfep5+IY04A3//T60W+3zw916DwQD GK20Xt2WAMZ5R8VxsqBi2QEsOi8Td62aEAm+Cd+gB3WNueTur/ATAdGj7/kFm8DdEknr ODdCW1FTRgyNp5Xo5nzB23XkQHvn7gEZND0fXmGRcRaZgF9uhYapEV+Yish6Vg1UpWYh AvZw== X-Received: by 10.43.65.81 with SMTP id xl17mr9143555icb.29.1381522376875; Fri, 11 Oct 2013 13:12:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.119.166 with SMTP id kv6ls1431052qeb.10.gmail; Fri, 11 Oct 2013 13:12:56 -0700 (PDT) X-Received: by 10.220.186.202 with SMTP id ct10mr22918121vcb.14.1381522376549; Fri, 11 Oct 2013 13:12:56 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id tq4si17293690vdc.64.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 13:12:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 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.176; Received: by mail-vc0-f176.google.com with SMTP id ik5so1144361vcb.7 for ; Fri, 11 Oct 2013 13:12:56 -0700 (PDT) X-Gm-Message-State: ALoCoQnbq+Dt466fT40AkBMrAmcwgXMHNI4oGenICB4Q6fA8BWbrQxPJVjpsftAUC++bvAbpdSDa X-Received: by 10.220.169.203 with SMTP id a11mr18776038vcz.26.1381522376171; Fri, 11 Oct 2013 13:12:56 -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 u4csp66944vcz; Fri, 11 Oct 2013 13:12:55 -0700 (PDT) X-Received: by 10.50.154.66 with SMTP id vm2mr4120595igb.57.1381522375277; Fri, 11 Oct 2013 13:12:55 -0700 (PDT) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) by mx.google.com with ESMTPS id 7si2613465igt.18.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 13:12:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.223.179 is neither permitted nor denied by best guess record for domain of ryan.arnold@linaro.org) client-ip=209.85.223.179; Received: by mail-ie0-f179.google.com with SMTP id aq17so6960434iec.24 for ; Fri, 11 Oct 2013 13:12:54 -0700 (PDT) X-Received: by 10.50.30.162 with SMTP id t2mr4161102igh.25.1381522374870; Fri, 11 Oct 2013 13:12:54 -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 m1sm4679998igj.10.2013.10.11.13.12.53 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 11 Oct 2013 13:12:54 -0700 (PDT) From: "Ryan S. Arnold" To: Rob Savoye Cc: patches@linaro.org, "Ryan S. Arnold" Subject: [PATCH][test_fetch_md5sums 2/2] testsuite/test.sh: Add fetch tests section. Date: Fri, 11 Oct 2013 15:12:18 -0500 Message-Id: <1381522338-30673-2-git-send-email-ryan.arnold@linaro.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1381522338-30673-1-git-send-email-ryan.arnold@linaro.org> References: <1381522338-30673-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.176 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" When run in the src dir the find_snapshot test would generate errors because the md5sums file that find_snapshot uses wasn't downloaded. This test addition creates a temporary build directory and performs a "fetch md5sums" test. This patch also adds a wget quiet option that is used when running the test suite. --- lib/fetch.sh | 2 +- testsuite/test.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/fetch.sh b/lib/fetch.sh index 7505813..85ed871 100755 --- a/lib/fetch.sh +++ b/lib/fetch.sh @@ -124,7 +124,7 @@ fetch_http() # NOTE: the timeout is short, and we only try twice to access the # remote host. This is to improve performance when offline, or # the remote host is offline. - dryrun "${wget_bin} --timeout=1 --tries=2 --directory-prefix=${local_snapshots}/${dir} ${remote_snapshots}/${getfile}" + dryrun "${wget_bin} ${wget_quiet:+-q} --timeout=1 --tries=2 --directory-prefix=${local_snapshots}/${dir} ${remote_snapshots}/${getfile}" if test ! -s ${local_snapshots}/${getfile}; then warning "downloaded file ${getfile} has zero data!" return 1 diff --git a/testsuite/test.sh b/testsuite/test.sh index 7c3cf7d..b3d3778 100755 --- a/testsuite/test.sh +++ b/testsuite/test.sh @@ -15,6 +15,10 @@ if test -e "${PWD}/host.conf"; then . "${PWD}/host.conf" else warning "no host.conf file!" + remote_snapshots=http://cbuild.validation.linaro.org/snapshots + local_snapshots=test_snapshots + wget_bin=/usr/bin/wget + wget_quiet=yes fi # Since we're testing, we don't load the host.conf file, instead @@ -22,6 +26,10 @@ fi cbuild_top=/build/cbuild2/test hostname=test.foobar.org target=x86_64-linux-gnu +#remote_snapshots=http://cbuild.validation.linaro.org/snapshots +#local_snapshots=test_snapshots +#wget_bin=/usr/bin/wget +#wget_quiet=yes if test x"$1" = x"-v"; then debug=yes @@ -142,6 +150,19 @@ else fi # ---------------------------------------------------------------------------------- +echo "============= fetch() tests ================" +if test -d "${local_snapshots}"; then + notice "${local_snapshots} directory exists. Moving it to ${local_snapshots}.bak." + mv ${local_snapshots} ${local_snapshots}.bak +fi + +out="`fetch md5sums`" +if test $? -eq 0; then + pass "fetch md5sums" +else + fail "fetch md5sums" +fi +# ---------------------------------------------------------------------------------- echo "============= find_snapshot() tests ================" out="`find_snapshot gcc`"