diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 569: Generalize Nexus implementation

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

Commit Message

Tyler Baker March 29, 2013, 6:40 p.m. UTC
Merge authors:
  Tyler Baker (tyler-baker)
Related merge proposals:
  https://code.launchpad.net/~tyler-baker/lava-dispatcher/refactor-nexus/+merge/156205
  proposed by: Tyler Baker (tyler-baker)
  review: Approve - Tyler Baker (tyler-baker)
------------------------------------------------------------
revno: 569 [merge]
committer: Tyler Baker <tyler.baker@linaro.org>
branch nick: lava-dispatcher
timestamp: Fri 2013-03-29 11:38:27 -0700
message:
  Generalize Nexus implementation
renamed:
  lava_dispatcher/device/nexus.py => lava_dispatcher/device/fastboot.py
modified:
  lava_dispatcher/config.py
  lava_dispatcher/default-config/lava-dispatcher/device-types/nexus.conf
  lava_dispatcher/device/fastboot.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/config.py'
--- lava_dispatcher/config.py	2013-02-18 06:00:28 +0000
+++ lava_dispatcher/config.py	2013-03-29 18:21:28 +0000
@@ -95,7 +95,7 @@ 
 
     adb_command = schema.StringOption()
     fastboot_command = schema.StringOption()
-    nexus_working_directory = schema.StringOption(default=None)
+    shared_working_directory = schema.StringOption(default=None)
 
 class OptionDescriptor(object):
     def __init__(self, name):

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/nexus.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-types/nexus.conf	2013-01-22 01:58:09 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-types/nexus.conf	2013-03-29 18:21:28 +0000
@@ -25,19 +25,19 @@ 
 # Working directory for temporary files. By default, the usual place for LAVA
 # images will be used.
 #
-# This is useful when the lava dispatcher is controlling Nexus phones that are
+# This is useful when the lava dispatcher is controlling the device under test which is
 # physically plugged to other machines by setting adb_command to something like
 # "ssh <phone-host> adb" and fastboot_command to something like "ssh
 # <phone-host> fastboot". adb and fastboot always operate on local files, so
 # you need your local files to also be seen as local files on the host where
 # adb/fastboot are executed.
 #
-# In this case, you should set nexus_work_directory to a shared directory
+# In this case, you should set shared_working_directory to a shared directory
 # between the machine running the dispatcher and the machine where the phone is
 # plugged.  This shared directory must have the same path in both machines.
 # For example, you can have your /var/tmp/lava mounted at /var/tmp/lava at
 # <phone-host> (or the other way around).
-nexus_working_directory =
+shared_working_directory =
 
 connection_command = %(adb_command)s shell
 

=== renamed file 'lava_dispatcher/device/nexus.py' => 'lava_dispatcher/device/fastboot.py'
--- lava_dispatcher/device/nexus.py	2013-03-26 01:02:10 +0000
+++ lava_dispatcher/device/fastboot.py	2013-03-29 18:21:28 +0000
@@ -94,10 +94,10 @@ 
         self('boot %s' % image)
 
 
-class NexusTarget(Target):
+class FastbootTarget(Target):
 
     def __init__(self, context, config):
-        super(NexusTarget, self).__init__(context, config)
+        super(FastbootTarget, self).__init__(context, config)
 
         if not config.hard_reset_command:
             logging.warn(
@@ -192,13 +192,13 @@ 
 
     @property
     def working_dir(self):
-        if (self.config.nexus_working_directory is None or
-            self.config.nexus_working_directory.strip() == ''):
+        if (self.config.shared_working_directory is None or
+            self.config.shared_working_directory.strip() == ''):
             return self.scratch_dir
 
         if self._working_dir is None:
-            self._working_dir = mkdtemp(self.config.nexus_working_directory)
+            self._working_dir = mkdtemp(self.config.shared_working_directory)
         return self._working_dir
 
 
-target_class = NexusTarget
+target_class = FastbootTarget