=== modified file 'lava_dispatcher/actions/boot_control.py'
@@ -21,6 +21,7 @@
# with this program; if not, see <http://www.gnu.org/licenses>.
from lava_dispatcher.actions import BaseAction, BaseAndroidAction
+from lava_dispatcher.client import CriticalError
class cmd_boot_linaro_android_image(BaseAndroidAction):
""" Call client code to boot to the master image
@@ -29,10 +30,13 @@
#Workaround for commands coming too quickly at this point
client = self.client
client.proc.sendline("")
- client.boot_linaro_android_image()
+ try:
+ client.boot_linaro_android_image()
+ except:
+ raise CriticalError("Failed to boot test image.")
class cmd_boot_linaro_image(BaseAction):
- """ Call client code to boot to the master image
+ """ Call client code to boot to the test image
"""
def run(self):
client = self.client
@@ -43,7 +47,7 @@
client.boot_linaro_image()
except:
status = 'fail'
- raise
+ raise CriticalError("Failed to boot test image.")
finally:
self.context.test_data.add_result("boot_image", status)
=== modified file 'lava_dispatcher/actions/deploy.py'
@@ -170,9 +170,13 @@
client.run_cmd_master('udevadm trigger')
client.run_cmd_master('mkdir -p /mnt/root')
client.run_cmd_master('mount /dev/disk/by-label/testrootfs /mnt/root')
- client.run_cmd_master(
+ rc = client.run_cmd_master(
'wget -qO- %s |tar --numeric-owner -C /mnt/root -xzf -' % rootfs,
timeout=3600)
+ if rc != 0:
+ msg = "Deploy test rootfs partition: failed to download tarball."
+ raise OperationFailed(msg)
+
client.run_cmd_master('echo linaro > /mnt/root/etc/hostname')
#DO NOT REMOVE - diverting flash-kernel and linking it to /bin/true
#prevents a serious problem where packages getting installed that
@@ -191,8 +195,11 @@
client.run_cmd_master('udevadm trigger')
client.run_cmd_master('mkdir -p /mnt/boot')
client.run_cmd_master('mount /dev/disk/by-label/testboot /mnt/boot')
- client.run_cmd_master(
+ rc = client.run_cmd_master(
'wget -qO- %s |tar --numeric-owner -C /mnt/boot -xzf -' % bootfs)
+ if rc != 0:
+ msg = "Deploy test boot partition: failed to download tarball."
+ raise OperationFailed(msg)
client.run_cmd_master('umount /mnt/boot')
def refresh_hwpack(self, kernel_matrix, hwpack, use_cache=True):
=== modified file 'lava_dispatcher/actions/lava-test.py'
@@ -23,9 +23,7 @@
from datetime import datetime
import traceback
from lava_dispatcher.actions import BaseAction
-from lava_dispatcher.client import OperationFailed
-
-
+from lava_dispatcher.client import OperationFailed, CriticalError
def _setup_testrootfs(client):
#Make sure in master image
@@ -54,7 +52,6 @@
client.run_cmd_master('umount /mnt/root')
-
def _install_lava_test(client):
#install bazaar in tester image
client.run_cmd_master(
@@ -75,7 +72,7 @@
except:
tb = traceback.format_exc()
client.sio.write(tb)
- raise OperationFailed("lava-test deployment failed")
+ raise CriticalError("lava-test deployment failed")
class cmd_lava_test_run(BaseAction):