From patchwork Mon Apr 28 10:41:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 29195 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 00E7520B8D for ; Mon, 28 Apr 2014 10:42:35 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id at1sf7701158iec.2 for ; Mon, 28 Apr 2014 03:42:35 -0700 (PDT) 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=QyrJGT02BFn8wj8Xz9lIpv/Wjgog3GIIIX4Wfa2cBns=; b=bwkg948o/PHXKfVEF55LLbTQRJkChugfnrcGcjNc8r9nPtHOHfO5v7h+IsQQR5l9cG BppDaZ5dvwEjPstacd8q2HpLTV2hG/FzU03wYYpAA7EXdF2u7u7FgFVMBgwfcQky5xdS pbLY1d1ui2Nol+7ClWl4C44xkP7E4Eb7K+jFFt1USMZl2jy/TqtdzbHjoY212A1D5Dz9 zLZaA6+/1SkVbZQlDlRROd+eEZ5oCcKKL0PdbkWSBWO4xQNmie9WdUQVSQfW7rNXvuEo Ne3kiBMH9j2DqONeVs+J+NcyAjc2xFtQe5mGe5+oCoOLq8PEVJovyKDyRLbKV19AW5Ar svxw== X-Gm-Message-State: ALoCoQlGBlNlZTsjRc/jXtvb2qLh1E0NP8glA8e1NcSN2OT8VSrNBthBW9UEMqR5HPce5y2xScXt X-Received: by 10.182.75.193 with SMTP id e1mr12440021obw.1.1398681755028; Mon, 28 Apr 2014 03:42:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.182 with SMTP id 51ls2434998qgv.38.gmail; Mon, 28 Apr 2014 03:42:34 -0700 (PDT) X-Received: by 10.52.6.162 with SMTP id c2mr19843467vda.6.1398681754913; Mon, 28 Apr 2014 03:42:34 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id fn10si3522244vdc.81.2014.04.28.03.42.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 03:42:34 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so7981553veb.27 for ; Mon, 28 Apr 2014 03:42:34 -0700 (PDT) X-Received: by 10.58.187.78 with SMTP id fq14mr22720367vec.9.1398681754840; Mon, 28 Apr 2014 03:42:34 -0700 (PDT) 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.221.72 with SMTP id ib8csp107028vcb; Mon, 28 Apr 2014 03:42:34 -0700 (PDT) X-Received: by 10.229.198.2 with SMTP id em2mr3053132qcb.21.1398681754475; Mon, 28 Apr 2014 03:42:34 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id c8si7526421qab.213.2014.04.28.03.42.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 03:42:34 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) 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 1Wej0L-0007ql-TV; Mon, 28 Apr 2014 10:41:45 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wej0J-0007pY-UT for xen-devel@lists.xen.org; Mon, 28 Apr 2014 10:41:44 +0000 Received: from [193.109.254.147:58785] by server-6.bemta-14.messagelabs.com id 36/D7-13066-7603E535; Mon, 28 Apr 2014 10:41:43 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1398681701!1303545!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.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22828 invoked from network); 28 Apr 2014 10:41:42 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 28 Apr 2014 10:41:42 -0000 X-IronPort-AV: E=Sophos;i="4.97,943,1389744000"; d="scan'208";a="124285706" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 28 Apr 2014 10:41:41 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Mon, 28 Apr 2014 06:41:40 -0400 Received: from kazak.uk.xensource.com ([10.80.2.80] helo=zakaz.uk.xensource.com) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1Wej0F-0007Zb-Fg; Mon, 28 Apr 2014 11:41:40 +0100 Received: by zakaz.uk.xensource.com (sSMTP sendmail emulation); Mon, 28 Apr 2014 11:41:39 +0100 From: Ian Campbell To: Date: Mon, 28 Apr 2014 11:41:25 +0100 Message-ID: <1398681696-2773-4-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1398681672.29700.55.camel@kazak.uk.xensource.com> References: <1398681672.29700.55.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 v2 04/15] TestSupport: Add helper to fetch a URL on a host 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: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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: Signed-off-by: Ian Campbell --- Osstest/TestSupport.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 6558fc8..35838a7 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -54,6 +54,7 @@ BEGIN { target_putfile target_putfile_root target_putfilecontents_stash target_putfilecontents_root_stash + target_fetchurl target_put_guest_image target_editfile_root target_file_exists target_run_apt @@ -1431,6 +1432,13 @@ END return $cfgpath; } +sub target_fetchurl($$$;$) { + my ($ho, $url, $path, $timeo) = @_; + $timeo ||= 2000; + target_cmd_root($ho, "wget --progress=dot:mega -O $path $url", $timeo); +} + + sub target_put_guest_image ($$$) { my ($ho, $gho, $default) = @_; my $specimage = $r{"$gho->{Guest}_image"};