diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 296: Add support to install extra debian packages from lava_test_install (Luis Araujo)

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

Commit Message

Michael-Doyle Hudson May 23, 2012, 4:06 a.m. UTC
Merge authors:
  Luis Araujo (luis-araujo)
Related merge proposals:
  https://code.launchpad.net/~luis-araujo/lava-dispatcher/lava_test_install_deb/+merge/106883
  proposed by: Luis Araujo (luis-araujo)
  review: Approve - Zygmunt Krynicki (zkrynicki)
------------------------------------------------------------
revno: 296 [merge]
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Wed 2012-05-23 16:03:59 +1200
message:
  Add support to install extra debian packages from lava_test_install (Luis Araujo)
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
diff mbox

Patch

=== modified file 'lava_dispatcher/actions/lava-test.py'
--- lava_dispatcher/actions/lava-test.py	2012-05-22 17:52:40 +0000
+++ lava_dispatcher/actions/lava-test.py	2012-05-23 04:03:59 +0000
@@ -113,6 +113,9 @@ 
             'install_python': {
                 'type': 'array', 'items': {'type': 'string'}, 'optional': True
                 },
+            'install_deb': {
+                'type': 'array', 'items': {'type': 'string'}, 'optional': True
+                },
             'register': {
                 'type': 'array', 'items': {'type': 'string'}, 'optional': True
                 },
@@ -130,7 +133,7 @@ 
         else:
             self.context.test_data.add_result(test_result_name, 'pass')
 
-    def run(self, tests, install_python=None, register=None, timeout=2400):
+    def run(self, tests, install_python=None, install_deb=None, register=None, timeout=2400):
         logging.info(
             "Executing lava_test_install (%s) command" % ",".join(tests))
 
@@ -151,6 +154,12 @@ 
                         session, "pip install -e " + module,
                         'lava_test_install python (%s)' % module, timeout=60)
 
+            if install_deb:
+                debs = " ".join(install_deb)
+                self.run_command_with_test_result(
+                    session, "apt-get -y --force-yes install " + debs,
+                    'lava_test_install deb (%s)' % debs, timeout=timeout)
+
             if register:
                 for test_def_url in register:
                     self.run_command_with_test_result(