diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 393: configglue bug fixes found while doing fastmodel.py testing

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

Commit Message

Andy Doan Oct. 1, 2012, 10:19 p.m. UTC
Merge authors:
  Andy Doan (doanac)
------------------------------------------------------------
revno: 393 [merge]
committer: Andy Doan <andy.doan@linaro.org>
branch nick: lava-dispatcher
timestamp: Mon 2012-10-01 17:15:53 -0500
message:
  configglue bug fixes found while doing fastmodel.py testing
modified:
  lava_dispatcher/actions/lava-test.py
  lava_dispatcher/client/fastmodel.py
  lava_dispatcher/client/lmc_utils.py
  lava_dispatcher/config.py
  lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf
  lava_dispatcher/downloader.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-09-26 02:55:25 +0000
+++ lava_dispatcher/actions/lava-test.py	2012-09-27 21:59:57 +0000
@@ -75,15 +75,15 @@ 
         self.context.any_device_bundles = True
         logging.info("Executing lava_test_run %s command" % test_name)
         with self.client.tester_session() as session:
-            session.run('mkdir -p %s' % self.context.lava_result_dir)
+            session.run('mkdir -p %s' % self.context.config.lava_result_dir)
             session.export_display()
             bundle_name = generate_bundle_file_name(test_name)
             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))
+                    test_name, test_options,
+                    self.context.config.lava_result_dir, bundle_name))
             try:
                 rc = session.run(cmd, timeout=timeout)
             except:
@@ -142,7 +142,7 @@ 
 
         with self.client.reliable_session() as session:
 
-            lava_proxy = self.client.context.lava_proxy
+            lava_proxy = self.context.config.lava_proxy
             if lava_proxy:
                 session.run("sh -c 'export http_proxy=%s'" % lava_proxy)
 

=== modified file 'lava_dispatcher/client/fastmodel.py'
--- lava_dispatcher/client/fastmodel.py	2012-09-26 02:41:46 +0000
+++ lava_dispatcher/client/fastmodel.py	2012-09-27 21:59:57 +0000
@@ -137,7 +137,7 @@ 
         generate_android_image(
             'vexpress-a9', self._boot, self._data, self._system, self._sd_image)
 
-        self._copy_axf(self.client.boot_part, 'linux-system-ISW.axf')
+        self._copy_axf(self.config.boot_part, 'linux-system-ISW.axf')
 
         self._customize_android()
 

=== modified file 'lava_dispatcher/client/lmc_utils.py'
--- lava_dispatcher/client/lmc_utils.py	2012-09-26 02:41:46 +0000
+++ lava_dispatcher/client/lmc_utils.py	2012-09-27 21:59:57 +0000
@@ -21,7 +21,7 @@ 
     :param hwpack_url: url of the Linaro hwpack to download
     :param rootfs_url: url of the Linaro image to download
     """
-    logging.info("preparing to deploy on %s" % client.hostname)
+    logging.info("preparing to deploy on %s" % client.config.hostname)
     logging.info("  hwpack: %s" % hwpack_url)
     logging.info("  rootfs: %s" % rootfs_url)
 

=== modified file 'lava_dispatcher/config.py'
--- lava_dispatcher/config.py	2012-09-26 03:04:37 +0000
+++ lava_dispatcher/config.py	2012-09-27 21:59:57 +0000
@@ -59,7 +59,7 @@ 
     root_part = schema.IntOption()
     sdcard_part_android = schema.StringOption()
     sdcard_part_android_org = schema.StringOption()
-    soft_boot_cmd = schema.StringOption()
+    soft_boot_cmd = schema.StringOption(default="reboot")
     sys_part_android = schema.StringOption()
     sys_part_android_org = schema.StringOption()
     tester_hostname = schema.StringOption(default="linaro")
@@ -88,6 +88,7 @@ 
 class DispatcherSchema(schema.Schema):
     default_qemu_binary = schema.StringOption(default="qemu")
     lava_cachedir = schema.StringOption()
+    lava_cookies = schema.StringOption()
     lava_image_tmpdir = schema.StringOption()
     lava_image_url = schema.StringOption()
     lava_proxy = schema.StringOption()

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2012-09-27 19:44:01 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2012-10-01 22:15:53 +0000
@@ -111,7 +111,7 @@ 
 qemu_drive_interface = sd
 
 # This is used for snowball soft reset fix, since the reboot command is hanging.
-soft_boot_cmd =
+soft_boot_cmd = reboot
 
 # This is for android build where the network is not up by default. 1 or 0
 enable_network_after_boot_android = 1

=== modified file 'lava_dispatcher/downloader.py'
--- lava_dispatcher/downloader.py	2012-08-24 14:20:35 +0000
+++ lava_dispatcher/downloader.py	2012-09-27 21:59:57 +0000
@@ -133,7 +133,7 @@ 
     '''
     logging.info("Downloading image: %s" % url)
     if not imgdir:
-        imgdir = mkdtemp(dir=context.lava_image_tmpdir)
+        imgdir = mkdtemp(dir=context.config.lava_image_tmpdir)
         if delete_on_exit:
             atexit.register(shutil.rmtree, imgdir)
 
@@ -150,7 +150,8 @@ 
     else:
         raise Exception("Unsupported url protocol scheme: %s" % url.scheme)
 
-    with reader(url, context.lava_proxy, context.lava_cookies) as r:
+    cookies = context.config.lava_cookies
+    with reader(url, context.config.lava_proxy, cookies) as r:
         with _decompressor_stream(url, imgdir, decompress) as (writer, fname):
             bsize = 32768
             buff = r.read(bsize)