=== modified file 'lava_dispatcher/actions/deploy.py'
@@ -42,6 +42,7 @@
logging.info(" package: %s" % kernel_matrix[0])
logging.info("Booting master image")
client.boot_master_image()
+ self._format_testpartition()
logging.info("Waiting for network to come up")
try:
@@ -83,6 +84,16 @@
finally:
shutil.rmtree(self.tarball_dir)
+ def _format_testpartition(self):
+ client = self.client
+ logging.info("Format testboot and testrootfs partitions")
+ client.run_cmd_master('umount /dev/disk/by-label/testrootfs')
+ client.run_cmd_master(
+ 'mkfs.ext3 -q /dev/disk/by-label/testrootfs -L testrootfs')
+ client.run_cmd_master('umount /dev/disk/by-label/testboot')
+ client.run_cmd_master(
+ 'mkfs.vfat /dev/disk/by-label/testboot -n testboot')
+
def _get_partition_offset(self, image, partno):
cmd = 'parted %s -m -s unit b print' % image
part_data = getoutput(cmd)
@@ -173,9 +184,6 @@
def deploy_linaro_rootfs(self, rootfs):
client = self.client
logging.info("Deploying linaro image")
- client.run_cmd_master('umount /dev/disk/by-label/testrootfs')
- client.run_cmd_master(
- 'mkfs.ext3 -q /dev/disk/by-label/testrootfs -L testrootfs')
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')
@@ -199,9 +207,6 @@
def deploy_linaro_bootfs(self, bootfs):
client = self.client
logging.info("Deploying linaro bootfs")
- client.run_cmd_master('umount /dev/disk/by-label/testboot')
- client.run_cmd_master(
- 'mkfs.vfat /dev/disk/by-label/testboot -n testboot')
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')
=== modified file 'lava_dispatcher/actions/launch_control.py'
@@ -113,13 +113,19 @@
client.run_cmd_master('mkdir -p /mnt/root')
client.run_cmd_master(
'mount /dev/disk/by-label/%s /mnt/root' % result_disk)
+ # Clean results directory on master image
+ client.run_cmd_master(
+ 'rm -rf /tmp/lava_results.tgz /tmp/%s' % self.context.lava_result_dir)
client.run_cmd_master('mkdir -p /tmp/%s' % self.context.lava_result_dir)
client.run_cmd_master(
'cp /mnt/root/%s/*.bundle /tmp/%s' % (self.context.lava_result_dir,
self.context.lava_result_dir))
+ # Clean result bundle on test image
+ client.run_cmd_master(
+ 'rm -f /mnt/root/%s/*.bundle' % (self.context.lava_result_dir))
client.run_cmd_master('umount /mnt/root')
- #Create tarball of all results
+ # Create tarball of all results
logging.info("Creating lava results tarball")
client.run_cmd_master('cd /tmp')
client.run_cmd_master(