[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 157: Allow passing an option to the install step for lava-android-test

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

Commit Message

Paul Larson Nov. 16, 2011, 3:57 a.m.
Merge authors:
  Michael Hudson-Doyle (mwhudson)
Related merge proposals:
  https://code.launchpad.net/~mwhudson/lava-dispatcher/lava-android-test-install-option/+merge/81517
  proposed by: Michael Hudson-Doyle (mwhudson)
  review: Approve - Paul Larson (pwlars)
------------------------------------------------------------
revno: 157 [merge]
committer: Paul Larson <paul.larson@canonical.com>
branch nick: lava-dispatcher
timestamp: Tue 2011-11-15 21:55:04 -0600
message:
  Allow passing an option to the install step for lava-android-test
modified:
  lava_dispatcher/actions/lava-android-test.py
  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

Patch

=== modified file 'lava_dispatcher/actions/lava-android-test.py'
--- lava_dispatcher/actions/lava-android-test.py	2011-10-27 02:28:52 +0000
+++ lava_dispatcher/actions/lava-android-test.py	2011-11-02 20:22:23 +0000
@@ -82,10 +82,12 @@ 
     """
     lava-test deployment to test image rootfs by chroot
     """
-    def run(self, tests, timeout=2400):
+    def run(self, tests, option=None, timeout=2400):
         dev_name = self.is_ready_for_test()
         for test in tests:
             cmd = 'lava-android-test install %s -s %s' % (test, dev_name)
+            if option is not None:
+                cmd += ' -o ' + option
             rc = pexpect.run(cmd, timeout=None, logfile=sys.stdout, withexitstatus=True)[1]
             if rc != 0:
                 raise OperationFailed("Failed to install test case(%s) on device(%s) with return value: %s" % (test, dev_name, rc))

=== modified file 'lava_dispatcher/actions/lava-test.py'
--- lava_dispatcher/actions/lava-test.py	2011-10-27 06:12:13 +0000
+++ lava_dispatcher/actions/lava-test.py	2011-11-02 20:22:23 +0000
@@ -86,7 +86,7 @@ 
 
     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, test_options = "", timeout=-1):
         logging.info("Executing lava_test_run %s command" % test_name)
         #Make sure in test image now
@@ -101,7 +101,7 @@ 
 
         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: