=== added file 'lava_dispatcher/actions/android_install_cts_medias.py'
@@ -0,0 +1,50 @@
+# Copyright (C) 2012 Linaro Limited
+#
+# Author: Paul Larson <paul.larson@linaro.org>
+#
+# This file is part of LAVA Dispatcher.
+#
+# LAVA Dispatcher is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# LAVA Dispatcher is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses>.
+
+import logging
+from lava_dispatcher.actions import BaseAction
+
+
+class cmd_android_install_cts_medias(BaseAction):
+
+ parameters_schema = {
+ 'type': 'object',
+ 'properties': {
+ 'media_url': {'type': 'string', 'optional': True},
+ 'timeout': {'type': 'integer', 'optional': True},
+ },
+ 'additionalProperties': False,
+ }
+
+ def run(self, media_url=None, timeout=2400):
+ if not media_url:
+ media_url = self.client.config.cts_media_url
+ if not media_url:
+ logging.error("The url for the cts media files is not specified")
+ return
+
+ with self.client.target_device._as_master() as session:
+ if not session.has_partition_with_label('sdcard'):
+ return
+ session.run('mkdir -p /mnt/lava/sdcard')
+ session.run(
+ 'mount /dev/disk/by-label/sdcard /mnt/lava/sdcard')
+ self.client.target_device.target_extract(
+ session, media_url, '/mnt/lava/sdcard', timeout=timeout)
+ session.run('umount /mnt/lava/sdcard')
=== modified file 'lava_dispatcher/config.py'
@@ -28,6 +28,7 @@
class DeviceSchema(schema.Schema):
android_binary_drivers = schema.StringOption()
+ cts_media_url = schema.StringOption()
boot_cmds = schema.StringOption(fatal=True) # Can do better here
boot_cmds_android = schema.StringOption(fatal=True) # And here
boot_cmds_oe = schema.StringOption(fatal=True) # And here?
=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
@@ -111,5 +111,9 @@
# the url of disablesusepend.sh script in android git repository
git_url_disablesuspend_sh = "http://android.git.linaro.org/gitweb?p=device/linaro/common.git;a=blob_plain;f=disablesuspend.sh;hb=refs/heads/linaro-ics"
+
+# the url of the media files for CTS test
+cts_media_url = http://testdata.validation.linaro.org/cts/media.tgz
+
# how long the disablesuspend script should take to complete
#disablesuspend_timeout = 240