From patchwork Fri Sep 23 03:29: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: 4291 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 C687023F98 for ; Fri, 23 Sep 2011 03:29:15 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id BA7CEA18071 for ; Fri, 23 Sep 2011 03:29:15 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 23so4784794fxe.11 for ; Thu, 22 Sep 2011 20:29:15 -0700 (PDT) Received: by 10.223.5.76 with SMTP id 12mr4202242fau.103.1316748555649; Thu, 22 Sep 2011 20:29:15 -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.18.198 with SMTP id y6cs195183lad; Thu, 22 Sep 2011 20:29:15 -0700 (PDT) Received: by 10.216.172.10 with SMTP id s10mr2919816wel.85.1316748553656; Thu, 22 Sep 2011 20:29:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id m36si8962955weq.43.2011.09.22.20.29.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Sep 2011 20:29: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 1R6wRt-0003zP-4a for ; Fri, 23 Sep 2011 03:29:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 16349E0511 for ; Fri, 23 Sep 2011 03:29: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: 120 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 120: Add LAVA_TEST_URL config option for specifying where to install Message-Id: <20110923032913.11071.87619.launchpad@ackee.canonical.com> Date: Fri, 23 Sep 2011 03:29: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="14012"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 05df33e9f81d9d3c823e8f01a9a213e49b3fcfc1 Merge authors: Le Chi Thu le.chi.thu@linaro.org Related merge proposals: https://code.launchpad.net/~le-chi-thu/lava-dispatcher/lava-test-url-option/+merge/75273 proposed by: Le Chi Thu (le-chi-thu) ------------------------------------------------------------ revno: 120 [merge] committer: Paul Larson branch nick: dispatcher-release-merge timestamp: Thu 2011-09-22 22:26:35 -0500 message: Add LAVA_TEST_URL config option for specifying where to install lava-test from modified: lava_dispatcher/actions/lava-test.py lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf --- 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/actions/lava-test.py' --- lava_dispatcher/actions/lava-test.py 2011-09-23 02:53:30 +0000 +++ lava_dispatcher/actions/lava-test.py 2011-09-23 03:26:35 +0000 @@ -21,11 +21,12 @@ # with this program; if not, see . from datetime import datetime +import logging import traceback -import logging from lava_dispatcher.actions import BaseAction from lava_dispatcher.client import OperationFailed, CriticalError +from lava_dispatcher.config import get_config def _setup_testrootfs(client): #Make sure in master image @@ -62,9 +63,12 @@ cmd = ('chroot /mnt/root apt-get -y install bzr usbutils python-apt ' 'python-setuptools python-simplejson lsb-release') client.run_cmd_master(cmd, timeout=2400) - client.run_cmd_master('chroot /mnt/root bzr branch lp:lava-test') - client.run_cmd_master( - 'chroot /mnt/root sh -c "cd lava-test && python setup.py install"') + client.run_cmd_master("chroot /mnt/root apt-get -y install python-pip") + + dispatcher_config = get_config("lava-dispatcher") + lava_test_url = dispatcher_config.get("LAVA_TEST_URL") + logging.debug("Installing %s with pip" % lava_test_url) + client.run_cmd_master('chroot /mnt/root pip install -e ' + lava_test_url) #Test if lava-test installed try: @@ -115,7 +119,6 @@ if install_python: for module in install_python: - client.run_cmd_master("chroot /mnt/root apt-get -y install python-pip") client.run_cmd_master("chroot /mnt/root pip install -e " + module) if register: === modified file 'lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf' --- lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf 2011-09-23 02:53:30 +0000 +++ lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf 2011-09-23 03:26:35 +0000 @@ -24,3 +24,6 @@ # 40 = ERROR # Messages with a lower number than LOGGING_LEVEL will be suppressed LOGGING_LEVEL = 20 + +# The url point to the version of lava-test to be install with pip +LAVA_TEST_URL = bzr+http://bazaar.launchpad.net/~linaro-validation/lava-test/trunk/#egg=lava-test