summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler <tyler.baker@linaro.org>2014-10-03 03:54:15 (GMT)
committerTyler <tyler.baker@linaro.org>2014-10-03 03:54:15 (GMT)
commit18b967f2ec1393502f686127867142724f3cfb6e (patch)
treef5a6f3c85876c792d016ffadb4937e6e8803262b
parent2839d36cfaa18def58c41733c765d044f2dd59f7 (diff)
parent95d232c2c61ee727b69f6e2012a77883ab2d6d63 (diff)
downloadlava-dispatcher-18b967f2ec1393502f686127867142724f3cfb6e.tar.gz
lava-dispatcher-18b967f2ec1393502f686127867142724f3cfb6e.tar.xz
Merge branch 'master' into staging
-rw-r--r--lava_dispatcher/config.py2
-rw-r--r--lava_dispatcher/device/bootloader.py2
-rw-r--r--lava_dispatcher/device/ipmi_tftp.py2
-rw-r--r--lava_dispatcher/device/jtag_drivers.py4
-rw-r--r--lava_dispatcher/device/master.py2
-rw-r--r--lava_dispatcher/device/target.py3
-rw-r--r--lava_dispatcher/device/vexpress.py24
7 files changed, 21 insertions, 18 deletions
diff --git a/lava_dispatcher/config.py b/lava_dispatcher/config.py
index f13c419..76195d3 100644
--- a/lava_dispatcher/config.py
+++ b/lava_dispatcher/config.py
@@ -52,6 +52,8 @@ class DeviceSchema(schema.Schema):
boot_part_android_org = schema.IntOption()
boot_retries = schema.IntOption(default=3)
bootloader_prompt = schema.StringOption()
+ bootloader_timeout = schema.IntOption(default=120)
+ image_boot_msg_timeout = schema.IntOption(default=120)
send_char = schema.BoolOption(default=True)
test_image_prompts = schema.ListOption(default=["\(initramfs\)",
"linaro-test",
diff --git a/lava_dispatcher/device/bootloader.py b/lava_dispatcher/device/bootloader.py
index e1f2361..9b0d241 100644
--- a/lava_dispatcher/device/bootloader.py
+++ b/lava_dispatcher/device/bootloader.py
@@ -313,7 +313,7 @@ class BootloaderTarget(MasterImageTarget):
self.proc.sendline(self.config.pre_boot_cmd,
send_char=self.config.send_char)
self._customize_bootloader(self.proc, boot_cmds)
- self.proc.expect(self.config.image_boot_msg, timeout=300)
+ self.proc.expect(self.config.image_boot_msg, self.config.image_boot_msg_timeout)
self._auto_login(self.proc)
self._wait_for_prompt(self.proc, self.config.test_image_prompts,
self.config.boot_linaro_timeout)
diff --git a/lava_dispatcher/device/ipmi_tftp.py b/lava_dispatcher/device/ipmi_tftp.py
index c62910e..e2c95fc 100644
--- a/lava_dispatcher/device/ipmi_tftp.py
+++ b/lava_dispatcher/device/ipmi_tftp.py
@@ -183,7 +183,7 @@ class IpmiPxeTarget(Target):
self._enter_bootloader(self.proc)
boot_cmds = self._load_boot_cmds(default='boot_cmds_master')
self._customize_bootloader(self.proc, boot_cmds)
- self.proc.expect(self.config.image_boot_msg, timeout=300)
+ self.proc.expect(self.config.image_boot_msg, self.config.image_boot_msg_timeout)
self._wait_for_prompt(self.proc, self.config.test_image_prompts,
self.config.boot_linaro_timeout)
self.proc.sendline('export PS1="%s"' % self.MASTER_PS1)
diff --git a/lava_dispatcher/device/jtag_drivers.py b/lava_dispatcher/device/jtag_drivers.py
index 3c7b4c4..22ed8c9 100644
--- a/lava_dispatcher/device/jtag_drivers.py
+++ b/lava_dispatcher/device/jtag_drivers.py
@@ -175,7 +175,7 @@ class stmc(BaseDriver):
# Ask the master to deliver the image
self.context.transport.request_send('lava_ms_boot', None)
- proc.expect(self.config.image_boot_msg, timeout=300)
+ proc.expect(self.config.image_boot_msg, self.config.image_boot_msg_timeout)
return proc
else:
boot_cmds.insert(0, self._stmc_command)
@@ -225,5 +225,5 @@ class stmc(BaseDriver):
logging.info("Delivering images with STMC")
self.context.run_command(jtag_command, failok=False)
- proc.expect(self.config.image_boot_msg, timeout=300)
+ proc.expect(self.config.image_boot_msg, self.config.image_boot_msg_timeout)
return proc
diff --git a/lava_dispatcher/device/master.py b/lava_dispatcher/device/master.py
index 83968d8..975f54d 100644
--- a/lava_dispatcher/device/master.py
+++ b/lava_dispatcher/device/master.py
@@ -419,7 +419,7 @@ class MasterImageTarget(Target):
boot_cmds = self._load_boot_cmds(default='boot_cmds_master',
boot_tags=self.master_boot_tags)
self._customize_bootloader(self.proc, boot_cmds)
- self.proc.expect(self.config.image_boot_msg, timeout=300)
+ self.proc.expect(self.config.image_boot_msg, self.config.image_boot_msg_timeout)
self._auto_login(self.proc, is_master=True)
self._wait_for_prompt(self.proc, self.config.master_str, timeout=300)
diff --git a/lava_dispatcher/device/target.py b/lava_dispatcher/device/target.py
index 83a4194..00ec1af 100644
--- a/lava_dispatcher/device/target.py
+++ b/lava_dispatcher/device/target.py
@@ -467,7 +467,8 @@ class Target(object):
connection.empty_buffer()
def _enter_bootloader(self, connection):
- if connection.expect(self.config.interrupt_boot_prompt) != 0:
+ if connection.expect(self.config.interrupt_boot_prompt,
+ self.config.bootloader_timeout) != 0:
raise Exception("Failed to enter bootloader")
if self.config.interrupt_boot_control_character:
connection.sendcontrol(self.config.interrupt_boot_control_character)
diff --git a/lava_dispatcher/device/vexpress.py b/lava_dispatcher/device/vexpress.py
index 4ba0bf5..32865a4 100644
--- a/lava_dispatcher/device/vexpress.py
+++ b/lava_dispatcher/device/vexpress.py
@@ -47,14 +47,14 @@ class VexpressTarget(BootloaderTarget):
if self.config.vexpress_requires_trusted_firmware:
if (self.config.vexpress_bl1_image_filename is None or
- self.config.vexpress_bl1_image_files is None or
- self.config.vexpress_uefi_image_filename is None or
- self.config.vexpress_uefi_image_files is None or
- self.config.vexpress_bl1_path is None or
- self.config.vexpress_bl1_backup_path is None or
- self.config.vexpress_uefi_path is None or
- self.config.vexpress_uefi_backup_path is None or
- self.config.vexpress_usb_mass_storage_device is None):
+ self.config.vexpress_bl1_image_files is None or
+ self.config.vexpress_uefi_image_filename is None or
+ self.config.vexpress_uefi_image_files is None or
+ self.config.vexpress_bl1_path is None or
+ self.config.vexpress_bl1_backup_path is None or
+ self.config.vexpress_uefi_path is None or
+ self.config.vexpress_uefi_backup_path is None or
+ self.config.vexpress_usb_mass_storage_device is None):
raise CriticalError(
"Versatile Express devices that use "
@@ -67,10 +67,10 @@ class VexpressTarget(BootloaderTarget):
"vexpress_usb_mass_storage_device")
else:
if (self.config.vexpress_uefi_image_filename is None or
- self.config.vexpress_uefi_image_files is None or
- self.config.vexpress_uefi_path is None or
- self.config.vexpress_uefi_backup_path is None or
- self.config.vexpress_usb_mass_storage_device is None):
+ self.config.vexpress_uefi_image_files is None or
+ self.config.vexpress_uefi_path is None or
+ self.config.vexpress_uefi_backup_path is None or
+ self.config.vexpress_usb_mass_storage_device is None):
raise CriticalError(
"Versatile Express devices must specify all "