diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 362: allow test image hostname to be configurable

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

Commit Message

Andy Doan Aug. 2, 2012, 11:09 p.m. UTC
Merge authors:
  Spring Zhang (qzhang)
Related merge proposals:
  https://code.launchpad.net/~qzhang/lava-dispatcher/add-tester_hostname/+merge/117752
  proposed by: Spring Zhang (qzhang)
  review: Approve - Andy Doan (doanac)
------------------------------------------------------------
revno: 362 [merge]
committer: Andy Doan <andy.doan@linaro.org>
branch nick: lava-dispatcher
timestamp: Thu 2012-08-02 18:05:20 -0500
message:
  allow test image hostname to be configurable
modified:
  doc/changes.rst
  lava_dispatcher/client/base.py
  lava_dispatcher/client/fastmodel.py
  lava_dispatcher/client/master.py
  lava_dispatcher/client/qemu.py
  lava_dispatcher/default-config/lava-dispatcher/device-defaults.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/changes.rst'
--- doc/changes.rst	2012-07-22 22:11:31 +0000
+++ doc/changes.rst	2012-08-02 02:33:34 +0000
@@ -1,11 +1,13 @@ 
 Version History
 ***************
 
-.. _version_0_15:
+.. _version_0_16:
 
 Version 0.16
 ============
-* Unreleased
+* UnReleased
+* Fix #1028512, provide test image hostname custom option: tester_hostname.
+* Fix #1019630, possibility to set proxy error when sending serial port command.
 
 .. _version_0_15_2:
 

=== modified file 'lava_dispatcher/client/base.py'
--- lava_dispatcher/client/base.py	2012-08-01 15:41:23 +0000
+++ lava_dispatcher/client/base.py	2012-08-01 17:52:55 +0000
@@ -288,6 +288,10 @@ 
         return self.device_option("hostname")
 
     @property
+    def tester_hostname(self):
+        return self.device_option("tester_hostname", "linaro")
+
+    @property
     def tester_str(self):
         return self.device_option("TESTER_STR")
 

=== modified file 'lava_dispatcher/client/fastmodel.py'
--- lava_dispatcher/client/fastmodel.py	2012-07-24 03:59:15 +0000
+++ lava_dispatcher/client/fastmodel.py	2012-08-01 17:52:55 +0000
@@ -93,7 +93,8 @@ 
 
     def _customize_ubuntu(self):
         with image_partition_mounted(self._sd_image, self.root_part) as mntdir:
-            logging_system('sudo echo linaro > %s/etc/hostname' % mntdir)
+            logging_system('sudo echo %s > %s/etc/hostname'
+                % (self.tester_hostname, mntdir)
 
     def deploy_image(self, image, axf, is_android=False):
         self._axf = download_image(axf, self.context)

=== modified file 'lava_dispatcher/client/master.py'
--- lava_dispatcher/client/master.py	2012-07-27 12:15:47 +0000
+++ lava_dispatcher/client/master.py	2012-08-01 17:52:55 +0000
@@ -114,7 +114,8 @@ 
     # another hour to err on the side of caution.
     _deploy_tarball_to_board(session, rootfs, '/mnt/root', timeout=18000)
 
-    session.run('echo linaro > /mnt/root/etc/hostname')
+    session.run('echo %s > /mnt/root/etc/hostname'
+        % session._client.tester_hostname)
     #DO NOT REMOVE - diverting flash-kernel and linking it to /bin/true
     #prevents a serious problem where packages getting installed that
     #call flash-kernel can update the kernel on the master image

=== modified file 'lava_dispatcher/client/qemu.py'
--- lava_dispatcher/client/qemu.py	2012-07-21 22:56:42 +0000
+++ lava_dispatcher/client/qemu.py	2012-08-01 17:52:55 +0000
@@ -56,7 +56,8 @@ 
             image_file = download_image(image, self.context)
         self._lava_image = image_file
         with image_partition_mounted(self._lava_image, self.root_part) as mntdir:
-            logging_system('echo linaro > %s/etc/hostname' % mntdir)
+            logging_system('echo %s > %s/etc/hostname' % (self.tester_hostname,
+                mntdir))
 
     @contextlib.contextmanager
     def _mnt_prepared_for_qemu(self, mntdir):

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2012-07-07 05:37:29 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2012-08-01 17:52:55 +0000
@@ -81,6 +81,9 @@ 
 # Master image recognization string
 MASTER_STR = root@master
 
+# Test image hostname, set blank to get default value "linaro"
+tester_hostname =
+
 # Test image recognization string
 TESTER_STR = root@linaro