diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 561: experimental fix for "boot_linaro_android_image before lava_test_shell" problem

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

Commit Message

Michael-Doyle Hudson Feb. 18, 2013, 1:24 a.m. UTC
------------------------------------------------------------
revno: 561
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Mon 2013-02-18 14:23:23 +1300
message:
  experimental fix for "boot_linaro_android_image before lava_test_shell" problem
modified:
  lava_dispatcher/device/fastmodel.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/device/fastmodel.py'
--- lava_dispatcher/device/fastmodel.py	2013-01-23 00:35:28 +0000
+++ lava_dispatcher/device/fastmodel.py	2013-02-18 01:23:23 +0000
@@ -172,6 +172,7 @@ 
         super(FastModelTarget, self).power_off(proc)
         if self._sim_proc is not None:
             self._sim_proc.close()
+            self._sim_proc = None
 
     def _create_rtsm_ostream(self, ofile):
         """the RTSM binary uses the windows code page(cp1252), but the
@@ -188,6 +189,10 @@ 
         DrainConsoleOutput(proc=self._sim_proc).start()
 
     def power_on(self):
+        if self._sim_proc is not None:
+            logging.warning("device was still on, shutting down")
+            self.power_off()
+
         self._fix_perms()
 
         options = boot_options.as_string(self, join_pattern=' -C %s=%s')