From patchwork Wed Jan 2 16:30:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Terceiro X-Patchwork-Id: 13766 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9F66A23E03 for ; Wed, 2 Jan 2013 16:30:25 +0000 (UTC) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by fiordland.canonical.com (Postfix) with ESMTP id 3A332A193FE for ; Wed, 2 Jan 2013 16:30:25 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id f13so14414188vcb.18 for ; Wed, 02 Jan 2013 08:30:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:content-type:mime-version:x-launchpad-project :x-launchpad-branch:x-launchpad-message-rationale :x-launchpad-branch-revision-number:x-launchpad-notification-type:to :from:subject:message-id:date:reply-to:sender:errors-to:precedence :x-generated-by:x-launchpad-hash:x-gm-message-state; bh=TAWVE4gjJUD9DKd8eh2+qlfQWrZRly/WPJ3P/x+/4a8=; b=o+2GQKyUimFH5XPpsZUYBIQ2R3a101+We3B0ZOJiKl8GZRAxyPN9Pvb5LTfp6ucyLW 4hv5lhdV6LE/Y3gUNejwUlWdF/emZwTZDrNfjnInpVw6Ex9ZjVklIoN5ZAXQcPU8jd+8 t18Mu+xvP8q1uqMs8CG/3fR1eVze9FlzLFIxmR1qzi3cJbSL1+Ju7WliM252qJAAvjFp m/8URjLxVLEmi5jHsGtHZKxy86wjq/5bacXIF6micL7iph1O/exbwUQt4Fco5UFNKLeN V8mx6Et5CpkfoZ8MI7WukD/owGOkYGDUBZ4mhWh+1v5+q2fubjcco5MAsYjrKUBK+9xW y84g== X-Received: by 10.52.18.207 with SMTP id y15mr61600347vdd.8.1357144224689; Wed, 02 Jan 2013 08:30:24 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp53731veb; Wed, 2 Jan 2013 08:30:24 -0800 (PST) X-Received: by 10.194.23.37 with SMTP id j5mr73405325wjf.28.1357144223353; Wed, 02 Jan 2013 08:30:23 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id z2si66720062wjx.1.2013.01.02.08.30.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 08:30:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TqRCw-0003Fj-1H for ; Wed, 02 Jan 2013 16:30:22 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id EA392E02EA for ; Wed, 2 Jan 2013 16:30:21 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 514 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 514: Add --target parameter to `lava dispatch` Message-Id: <20130102163021.8672.34441.launchpad@ackee.canonical.com> Date: Wed, 02 Jan 2013 16:30:21 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16378"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 8e66f67cd44f92919f92a80a175d1fdac79bf8cc X-Gm-Message-State: ALoCoQlB9yVPkDlsgNIaku61zZI5N5TblOhOJhodcswM4IHsXXbdhjM6YDBbHLG+SRxHb7LftVI8 Merge authors: Antonio Terceiro (terceiro) Related merge proposals: https://code.launchpad.net/~terceiro/lava-dispatcher/target-cmdline/+merge/140949 proposed by: Antonio Terceiro (terceiro) review: Approve - Andy Doan (doanac) ------------------------------------------------------------ revno: 514 [merge] committer: Antonio Terceiro branch nick: trunk timestamp: Wed 2013-01-02 13:28:52 -0300 message: Add --target parameter to `lava dispatch` modified: lava/dispatcher/commands.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava/dispatcher/commands.py' --- lava/dispatcher/commands.py 2012-11-30 19:14:23 +0000 +++ lava/dispatcher/commands.py 2012-12-20 16:59:51 +0000 @@ -1,3 +1,4 @@ +import json import logging import os import sys @@ -62,6 +63,11 @@ "job_file", metavar="JOB", help="Test scenario file") + parser.add_argument( + "--target", + default = None, + help="Run the job on a specific target device" + ) def invoke(self): if self.args.oob_fd: @@ -96,6 +102,10 @@ # Load the scenario file with open(self.args.job_file) as stream: jobdata = stream.read() + if self.args.target is not None: + json_jobdata = json.loads(jobdata) + json_jobdata['target'] = self.args.target + jobdata = json.dumps(json_jobdata) job = LavaTestJob(jobdata, oob_file, config) #FIXME Return status