diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 367: fix some disablesuspend issues with fastmodel

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

Commit Message

Andy Doan Aug. 13, 2012, 1:56 p.m. UTC
Merge authors:
  Andy Doan (doanac)
------------------------------------------------------------
revno: 367 [merge]
committer: Andy Doan <andy.doan@linaro.org>
branch nick: lava-dispatcher
timestamp: Fri 2012-08-10 09:27:14 -0500
message:
  fix some disablesuspend issues with fastmodel
modified:
  lava_dispatcher/client/base.py
  lava_dispatcher/client/fastmodel.py
  lava_dispatcher/config.py
  lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf
  lava_dispatcher/default-config/lava-dispatcher/device-types/fastmodel.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 'lava_dispatcher/client/base.py'
--- lava_dispatcher/client/base.py	2012-08-02 23:05:53 +0000
+++ lava_dispatcher/client/base.py	2012-08-08 22:31:12 +0000
@@ -472,9 +472,8 @@ 
             else:
                 logging.info("Skip raising exception on the home screen has not displayed for health check jobs")
 
-        # we need to deal with the time the "input keyevent 82" takes
-        # 240: for fastmodels, 120 failed, 180 failed some
-        session.run('/system/bin/disablesuspend.sh', timeout=240)
+        timeout = self.config.getint("disablesuspend_timeout", 240)
+        session.run('/system/bin/disablesuspend.sh', timeout=timeout)
 
     def _enable_network(self):
         session = TesterCommandRunner(self, wait_for_rc=False)

=== modified file 'lava_dispatcher/client/fastmodel.py'
--- lava_dispatcher/client/fastmodel.py	2012-08-02 23:18:23 +0000
+++ lava_dispatcher/client/fastmodel.py	2012-08-08 22:26:59 +0000
@@ -91,7 +91,7 @@ 
             logging_system('sudo rm -f %s' % wallpaper)
 
         with image_partition_mounted(self._sd_image, self.SYS_PARTITION) as d:
-            script_path = '%s/%s' % (d, '/system/bin/disablesuspend.sh')
+            script_path = '%s/%s' % (d, 'bin/disablesuspend.sh')
             if self.git_url_disablesuspend_sh:
                 logging_system('sudo wget %s -O %s' % (
                                                self.git_url_disablesuspend_sh,

=== modified file 'lava_dispatcher/config.py'
--- lava_dispatcher/config.py	2012-06-25 19:42:56 +0000
+++ lava_dispatcher/config.py	2012-08-08 22:30:52 +0000
@@ -86,8 +86,14 @@ 
                 return default
             else:
                 raise
-    def getint(self, key):
-        return self.cp.getint("DEFAULT", key)
+    def getint(self, key, default=_sentinel):
+        try:
+            return self.cp.getint("DEFAULT", key)
+        except NoOptionError:
+            if default is not _sentinel:
+                return default
+            else:
+                raise
 
     def getboolean(self, key, default=True):
         try:

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2012-08-01 17:52:55 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2012-08-08 22:31:12 +0000
@@ -53,7 +53,7 @@ 
 #
 # This is used to regenerate init script when Android bootup for partitions are
 # changed if deployed in LAVA test image
-# 
+#
 # boot partition number in original Android, counting from 1
 boot_part_android_org = 1
 # sys partition number in original Android, counting from 1
@@ -69,7 +69,7 @@ 
 #
 # This is used to regenerate init script when Android bootup for partitions are
 # changed if deployed in LAVA test image
-# 
+#
 # sys partition number in LAVA test image, counting from 1
 sys_part_android = 5
 # sdcard partition number in LAVA test image, counting from 1
@@ -107,7 +107,7 @@ 
 # The value to pass to qemu-system-arm's -M option.
 qemu_machine_type = %(device_type)s
 
-# QEMU drive interface. 
+# QEMU drive interface.
 qemu_drive_interface = sd
 
 # This is used for snowball soft reset fix, since the reboot command is hanging.
@@ -118,4 +118,5 @@ 
 
 # the url of disablesusepend.sh script in android git repository
 git_url_disablesuspend_sh = "http://android.git.linaro.org/gitweb?p=device/linaro/common.git;a=blob_plain;f=disablesuspend.sh;hb=refs/heads/linaro-ics"
-
+# how long the disablesuspend script should take to complete
+#disablesuspend_timeout = 240

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/fastmodel.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-types/fastmodel.conf	2012-07-10 02:42:13 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-types/fastmodel.conf	2012-08-10 14:27:14 +0000
@@ -4,5 +4,6 @@ 
 # The license server must also be specified. eg:
 #license_server = 8224@192.168.1.10
 
-# the url of disablesusepend.sh script in android git repository
-git_url_disablesuspend_sh = "http://android.git.linaro.org/gitweb?p=device/linaro/common.git;a=blob_plain;f=disablesuspend.sh;hb=refs/heads/linaro-ics"
+# how long the disablesuspend script should take to complete
+# fm takes longer than other android images do
+disablesuspend_timeout = 500