diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 295: Added the config option LAVA_TEST_DEB, to allow the installation of lava-test with apt-get. (Rafa...

Message ID 20120523040610.15511.8754.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson May 23, 2012, 4:06 a.m. UTC
Merge authors:
  Rafael Martins (rafaelmartins)
Related merge proposals:
  https://code.launchpad.net/~rafaelmartins/lava-dispatcher/install-lava-test-with-apt-get/+merge/106867
  proposed by: Rafael Martins (rafaelmartins)
  review: Approve - Zygmunt Krynicki (zkrynicki)
------------------------------------------------------------
revno: 295 [merge]
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Wed 2012-05-23 16:02:38 +1200
message:
  Added the config option LAVA_TEST_DEB, to allow the installation of lava-test with apt-get. (Rafael Martins)
modified:
  doc/QUICKSTART
  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
diff mbox

Patch

=== modified file 'doc/QUICKSTART'
--- doc/QUICKSTART	2012-04-23 05:51:22 +0000
+++ doc/QUICKSTART	2012-05-22 17:52:40 +0000
@@ -102,6 +102,12 @@ 
     $ cat ~/.config/lava-dispatcher/lava-dispatcher.conf
     LAVA_PROXY = http://192.168.88.77:3128/
 
+The dispatcher will use ``pip`` to install the lava-test package by default.
+You may want to use ``apt-get`` to install a ``.deb`` package instead, and
+will need to set the LAVA_TEST_DEB, with the name of the package::
+
+    $ cat ~/.config/lava-dispatcher/lava-dispatcher.conf
+    LAVA_TEST_DEB = lava-test
 
 You will need to add a configuration file for your device. It can be
 extremely simple, just identifying the type of the device::

=== modified file 'lava_dispatcher/actions/lava-test.py'
--- lava_dispatcher/actions/lava-test.py	2012-05-09 22:24:31 +0000
+++ lava_dispatcher/actions/lava-test.py	2012-05-22 17:52:40 +0000
@@ -33,14 +33,20 @@ 
     #Install necessary packages for build lava-test
     cmd = ('apt-get -y --force-yes install '
            'bzr usbutils python-apt python-setuptools '
-           'python-simplejson lsb-release python-keyring')
+           'python-simplejson lsb-release python-keyring '
+           'python-pip')
     session.run(cmd, timeout=2400)
-    session.run("apt-get -y --force-yes install python-pip")
 
     dispatcher_config = client.context.config
-    lava_test_url = dispatcher_config.get("LAVA_TEST_URL")
-    logging.debug("Installing %s with pip" % lava_test_url)
-    session.run('pip install -e ' + lava_test_url)
+
+    lava_test_deb = dispatcher_config.get("LAVA_TEST_DEB", "")
+    if lava_test_deb != "":
+        logging.debug("Installing %s with apt-get" % lava_test_deb)
+        session.run("apt-get -y --force-yes install " + lava_test_deb)
+    else:
+        lava_test_url = dispatcher_config.get("LAVA_TEST_URL")
+        logging.debug("Installing %s with pip" % lava_test_url)
+        session.run('pip install -e ' + lava_test_url)
 
     #Test if lava-test installed
     session.run('which lava-test', timeout=60)

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf'
--- lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf	2012-05-08 05:37:59 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf	2012-05-22 17:52:40 +0000
@@ -29,9 +29,14 @@ 
 # 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
+# The url point to the version of lava-test to be install with pip (default)
 LAVA_TEST_URL = bzr+http://bazaar.launchpad.net/~linaro-validation/lava-test/trunk/#egg=lava-test
 
+# The name of the lava-test package to be installed with apt-get
+# Use this variable if you want to use apt-get instead of pip to install lava-test
+# LAVA_TEST_DEB = lava-test
+LAVA_TEST_DEB = 
+
 # The qemu command to use.  Called 'default_qemu_binary' because we
 # want to allow testing custom qemu binaries soon.
 default_qemu_binary = qemu