=== modified file 'lava_dispatcher/client/base.py'
@@ -339,6 +339,15 @@
dev_ip = session.get_default_nic_ip()
if dev_ip is None:
raise OperationFailed("failed to get board ip address")
+ try:
+ ## just disconnect the adb connection in case is remained
+ ## by last action or last job
+ ## that connection should be expired already
+ session.android_adb_disconnect(dev_ip)
+ except:
+ ## ignore all exception
+ ## this just in case of exception
+ pass
session.android_adb_connect(dev_ip)
session.wait_until_attached()
session.wait_home_screen()
=== modified file 'lava_dispatcher/client/master.py'
@@ -128,6 +128,7 @@
data_part_org = session._client.device_option("data_part_android_org")
# Sdcard layout in Lava image
sys_part_lava = session._client.device_option("sys_part_android")
+ data_part_lava = session._client.device_option("data_part_android")
session.run('mkdir -p ~/tmp/')
session.run('mv /mnt/lava/boot/uInitrd ~/tmp')
@@ -140,12 +141,16 @@
session.run(
'sed -i "/mount ext4 \/dev\/block\/mmcblk0p%s/d" init.rc'
% cache_part_org)
- session.run(
- 'sed -i "/mount ext4 \/dev\/block\/mmcblk0p%s/d" init.rc'
- % data_part_org)
+# session.run(
+# 'sed -i "/mount ext4 \/dev\/block\/mmcblk0p%s/d" init.rc'
+# % data_part_org)
+ session.run('sed -i "s/mmcblk0p%s/mmcblk0p%s/g" init.rc'
+ % (data_part_org, data_part_lava))
session.run('sed -i "s/mmcblk0p%s/mmcblk0p%s/g" init.rc'
% (sys_part_org, sys_part_lava))
- # for snowball the mcvblk1 is used instead of mmcblk0.
+ # for snowball the mcvblk1 is used instead of mmcblk0.
+ session.run('sed -i "s/mmcblk1p%s/mmcblk1p%s/g" init.rc'
+ % (data_part_org, data_part_lava))
session.run('sed -i "s/mmcblk1p%s/mmcblk1p%s/g" init.rc'
% (sys_part_org, sys_part_lava))
session.run(
@@ -167,7 +172,7 @@
def _deploy_linaro_android_testrootfs(session, systemtbz2, rootfstype):
logging.info("Deploying the test root filesystem")
- sdcard_part_lava = session._client.device_option("sdcard_part_android")
+# sdcard_part_lava = session._client.device_option("sdcard_part_android")
session.run('umount /dev/disk/by-label/testrootfs')
session.run(
@@ -178,10 +183,10 @@
'mount /dev/disk/by-label/testrootfs /mnt/lava/system')
_deploy_tarball_to_board(session, systemtbz2, '/mnt/lava', timeout=600)
- sed_cmd = "/dev_mount sdcard \/mnt\/sdcard/c dev_mount sdcard /mnt/sdcard %s " \
- "/devices/platform/omap/omap_hsmmc.0/mmc_host/mmc0" %sdcard_part_lava
- session.run(
- 'sed -i "%s" /mnt/lava/system/etc/vold.fstab' % sed_cmd)
+# sed_cmd = "/dev_mount sdcard \/mnt\/sdcard/c dev_mount sdcard /mnt/sdcard %s " \
+# "/devices/platform/omap/omap_hsmmc.0/mmc_host/mmc0" % sdcard_part_lava
+# session.run(
+# 'sed -i "%s" /mnt/lava/system/etc/vold.fstab' % sed_cmd)
session.run('sed -i "s/^PS1=.*$/PS1=\'root@linaro: \'/" /mnt/lava/system/etc/mkshrc')
session.run('umount /mnt/lava/system')
@@ -190,6 +195,15 @@
session.run('mkfs.vfat /dev/disk/by-label/sdcard -n sdcard')
session.run('udevadm trigger')
+def _deploy_linaro_android_data(session, datatbz2):
+ ##consider the compatiblity, here use the existed sdcard partition
+ data_label = 'sdcard'
+ session.run('mkfs.ext4 -q /dev/disk/by-label/%s -L %s' % (data_label, data_label))
+ session.run('udevadm trigger')
+ session.run('mkdir -p /mnt/lava/data')
+ session.run('mount /dev/disk/by-label/%s /mnt/lava/data' % (data_label))
+ _deploy_tarball_to_board(session, datatbz2, '/mnt/lava', timeout=600)
+ session.run('umount /mnt/lava/data')
class PrefixCommandRunner(CommandRunner):
"""A CommandRunner that prefixes every command run with a given string.
@@ -317,14 +331,15 @@
boot_tarball = boot_tbz2.replace(LAVA_IMAGE_TMPDIR, '')
system_tarball = system_tbz2.replace(LAVA_IMAGE_TMPDIR, '')
- #data_tarball = data_tbz2.replace(LAVA_IMAGE_TMPDIR, '')
+ data_tarball = data_tbz2.replace(LAVA_IMAGE_TMPDIR, '')
boot_url = '/'.join(u.strip('/') for u in [
LAVA_IMAGE_URL, boot_tarball])
system_url = '/'.join(u.strip('/') for u in [
LAVA_IMAGE_URL, system_tarball])
- #data_url = '/'.join(u.strip('/') for u in [
- # LAVA_IMAGE_URL, data_tarball])
+ data_url = '/'.join(u.strip('/') for u in [
+ LAVA_IMAGE_URL, data_tarball])
+
if pkg_tbz2:
pkg_tarball = pkg_tbz2.replace(LAVA_IMAGE_TMPDIR, '')
pkg_url = '/'.join(u.strip('/') for u in [
@@ -335,7 +350,8 @@
try:
_deploy_linaro_android_testboot(session, boot_url, pkg_url)
_deploy_linaro_android_testrootfs(session, system_url, rootfstype)
- _purge_linaro_android_sdcard(session)
+# _purge_linaro_android_sdcard(session)
+ _deploy_linaro_android_data(session, data_url)
except:
tb = traceback.format_exc()
self.sio.write(tb)
=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
@@ -71,7 +71,10 @@
# sys partition number in LAVA test image, counting from 1
sys_part_android = 5
# sdcard partition number in LAVA test image, counting from 1
-sdcard_part_android = 6
+#sdcard_part_android = 6
+
+# data partition number in LAVA test image, counting from 1
+data_part_android = 6
# Master image recognization string
MASTER_STR = root@master
=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/panda.conf'
@@ -14,5 +14,5 @@
setenv bootargs "'console=tty0 console=ttyO2,115200n8
rootwait rw earlyprintk fixrtc nocompcache vram=48M
omapfb.vram=0:24M,1:24M mem=456M@0x80000000 mem=512M@0xA0000000
- init=/init androidboot.console=ttyO2 no_console_suspend'",
+ init=/init androidboot.console=ttyO2'",
boot