Merge lp:~le-chi-thu/lava-dispatcher/lava-test-url-option into lp:lava-dispatcher

Proposed by Le Chi Thu
Status: Merged
Merged at revision: 120
Proposed branch: lp:~le-chi-thu/lava-dispatcher/lava-test-url-option
Merge into: lp:lava-dispatcher
Diff against target: 49 lines (+10/-4)
2 files modified
lava_dispatcher/actions/lava-test.py (+8/-4)
lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf (+2/-0)
To merge this branch: bzr merge lp:~le-chi-thu/lava-dispatcher/lava-test-url-option
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+75273@code.launchpad.net

Description of the change

Added LAVA_TEST_URL option and use pip to install lava-test.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

This seems to depend on the logging branch, so I'll look at merging it after we have that. Otherwise, looks ok to me. It would be a nice touch to also add some info to the README about it, or possibly some examples of how to install it from other sources besides a bzr branch.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_dispatcher/actions/lava-test.py'
2--- lava_dispatcher/actions/lava-test.py 2011-09-10 03:24:21 +0000
3+++ lava_dispatcher/actions/lava-test.py 2011-09-13 22:25:23 +0000
4@@ -21,9 +21,11 @@
5 # with this program; if not, see <http://www.gnu.org/licenses>.
6
7 from datetime import datetime
8+import logging
9 import traceback
10 from lava_dispatcher.actions import BaseAction
11 from lava_dispatcher.client import OperationFailed
12+from lava_dispatcher.config import get_config
13
14
15
16@@ -63,9 +65,12 @@
17 cmd = ('chroot /mnt/root apt-get -y install bzr usbutils python-apt '
18 'python-setuptools python-simplejson lsb-release')
19 client.run_cmd_master(cmd, timeout=2400)
20- client.run_cmd_master('chroot /mnt/root bzr branch lp:lava-test')
21- client.run_cmd_master(
22- 'chroot /mnt/root sh -c "cd lava-test && python setup.py install"')
23+ client.run_cmd_master("chroot /mnt/root apt-get -y install python-pip")
24+
25+ dispatcher_config = get_config("lava-dispatcher")
26+ lava_test_url = dispatcher_config.get("LAVA_TEST_URL")
27+ logging.debug("Installing %s with pip" % lava_test_url)
28+ client.run_cmd_master('chroot /mnt/root pip install -e ' + lava_test_url)
29
30 #Test if lava-test installed
31 try:
32@@ -107,7 +112,6 @@
33
34 if install_python:
35 for module in install_python:
36- client.run_cmd_master("chroot /mnt/root apt-get -y install python-pip")
37 client.run_cmd_master("chroot /mnt/root pip install -e " + module)
38
39 if register:
40
41=== modified file 'lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf'
42--- lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf 2011-09-08 23:35:05 +0000
43+++ lava_dispatcher/default-config/lava-dispatcher/lava-dispatcher.conf 2011-09-13 22:25:23 +0000
44@@ -17,3 +17,5 @@
45 # Location for caching downloaded artifacts such as hwpacks and images
46 LAVA_CACHEDIR = /linaro/images/cache
47
48+# The url point to the version of lava-test to be install with pip
49+LAVA_TEST_URL = bzr+http://bazaar.launchpad.net/~linaro-validation/lava-test/trunk/#egg=lava-test

Subscribers

People subscribed via source and target branches