From patchwork Thu Oct 20 17:59:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 4755 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 B688223E04 for ; Thu, 20 Oct 2011 17:59:19 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id A0275A18189 for ; Thu, 20 Oct 2011 17:59:19 +0000 (UTC) Received: by eyg5 with SMTP id 5so3982373eyg.11 for ; Thu, 20 Oct 2011 10:59:19 -0700 (PDT) Received: by 10.223.85.139 with SMTP id o11mr19647204fal.0.1319133559379; Thu, 20 Oct 2011 10:59:19 -0700 (PDT) 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.152.1.71 with SMTP id 7cs132036lak; Thu, 20 Oct 2011 10:59:19 -0700 (PDT) Received: by 10.216.163.203 with SMTP id a53mr1749496wel.35.1319133553735; Thu, 20 Oct 2011 10:59:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id v6si7641076weq.31.2011.10.20.10.59.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Oct 2011 10:59:13 -0700 (PDT) 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 1RGwtd-0001uX-6k for ; Thu, 20 Oct 2011 17:59:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 28D30FB21A for ; Thu, 20 Oct 2011 17:59:13 +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: 144 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 144: Allow use of override options flag in lava-test Message-Id: <20111020175913.5279.9547.launchpad@ackee.canonical.com> Date: Thu, 20 Oct 2011 17:59:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14165"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 423826522cc570c7c08679c44303e68b559afe14 Merge authors: Le Chi Thu le.chi.thu@linaro.org Related merge proposals: https://code.launchpad.net/~le-chi-thu/lava-dispatcher/override-test-options/+merge/79784 proposed by: Le Chi Thu (le-chi-thu) review: Approve - Spring Zhang (qzhang) ------------------------------------------------------------ revno: 144 [merge] committer: Paul Larson branch nick: lava-dispatcher timestamp: Thu 2011-10-20 12:57:23 -0500 message: Allow use of override options flag in lava-test added: doc/test_with_testoptions.json modified: lava_dispatcher/actions/lava-test.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 === added file 'doc/test_with_testoptions.json' --- doc/test_with_testoptions.json 1970-01-01 00:00:00 +0000 +++ doc/test_with_testoptions.json 2011-10-19 09:18:04 +0000 @@ -0,0 +1,25 @@ +{ + "job_name": "foo", + "target": "panda01", + "timeout": 18000, + "actions": [ + { + "command": "lava_test_install", + "parameters": + { + "tests": ["peacekeeper"] + } + }, + { + "command": "boot_linaro_image" + }, + { + "command": "lava_test_run", + "parameters": + { + "test_name": "peacekeeper", + "test_options": "firefox" + } + } + ] +} === modified file 'lava_dispatcher/actions/lava-test.py' --- lava_dispatcher/actions/lava-test.py 2011-10-18 02:38:34 +0000 +++ lava_dispatcher/actions/lava-test.py 2011-10-20 12:15:38 +0000 @@ -84,10 +84,10 @@ class cmd_lava_test_run(BaseAction): - def test_name(self, test_name, timeout=-1): + def test_name(self, test_name, test_options = "", timeout=-1): return super(cmd_lava_test_run, self).test_name() + ' (%s)' % test_name - def run(self, test_name, timeout=-1): + def run(self, test_name, test_options = "", timeout=-1): logging.info("Executing lava_test_run %s command" % test_name) #Make sure in test image now client = self.client @@ -95,8 +95,12 @@ client.run_cmd_tester('mkdir -p %s' % self.context.lava_result_dir) client.export_display() bundle_name = test_name + "-" + datetime.now().strftime("%H%M%S") - cmd = ('lava-test run %s -o %s/%s.bundle' % ( - test_name, self.context.lava_result_dir, bundle_name)) + + if test_options != "": + test_options = "-t '%s'" % test_options + + cmd = ('lava-test run %s %s -o %s/%s.bundle' % ( + test_name, test_options, self.context.lava_result_dir, bundle_name)) try: rc = client.run_cmd_tester(cmd, timeout=timeout) except: