=== removed file 'doc/examples/jobs/android-new-kernel.json'
@@ -1,47 +0,0 @@
-{
- "job_name": "android_new_kernel",
- "target": "panda01",
- "timeout": 18000,
- "actions": [
- {
- "command": "deploy_linaro_android_image",
- "parameters":
- {
- "boot": "https://android-build.linaro.org/jenkins/job/linaro-android_leb-panda/61/artifact/build/out/target/product/pandaboard/boot.tar.bz2",
- "system": "https://android-build.linaro.org/jenkins/job/linaro-android_leb-panda/61/artifact/build/out/target/product/pandaboard/system.tar.bz2",
- "data": "https://android-build.linaro.org/jenkins/job/linaro-android_leb-panda/61/artifact/build/out/target/product/pandaboard/userdata.tar.bz2",
- "pkg": "https://android-build.linaro.org/jenkins/job/linaro-android_leb-panda/171/artifact/build/out/target/product/pandaboard/boot.tar.bz2"
- },
- "metadata":
- {
- "rootfs.type": "android",
- "rootfs.build": "61"
- }
- },
- {
- "command": "boot_linaro_android_image"
- },
- {
- "command": "lava_android_test_install",
- "parameters":
- {
- "tests": ["0xbench"]
- }
- },
- {
- "command": "lava_android_test_run",
- "parameters":
- {
- "test_name": "0xbench"
- }
- },
- {
- "command": "submit_results_on_host",
- "parameters":
- {
- "server": "http://validation.linaro.org/lava-server/RPC2/",
- "stream": "/anonymous/android-panda01-basic/"
- }
- }
- ]
-}
=== removed file 'doc/examples/jobs/lava-new-kernel.json'
@@ -1,30 +0,0 @@
-{
- "job_name": "new-kernel",
- "target": "mx53loco01",
- "timeout": 6000,
- "actions": [
- {
- "command": "deploy_linaro_image",
- "parameters":
- {
- "rootfs":
-"http://snapshots.linaro.org/11.05-daily/linaro-nano/20110612/0/images/tar/nano-n-tar-20110612-0.tar.gz",
- "hwpack":
-"http://snapshots.linaro.org/11.05-daily/linaro-hwpacks/lt-mx53loco/20110609/0/images/hwpack/hwpack_linaro-lt-mx53loco_20110609-0_armel_supported.tar.gz",
- "kernel_matrix":[
-"http://pkgserver/original/linux-image-2.6.38-1000-linaro-lt-mx5_2.6.38-1000.7_armel.deb", "linux-image-2.6.38"]
- }
- },
- {
- "command": "boot_linaro_image"
- },
- {
- "command": "submit_results",
- "parameters":
- {
- "server": "http://validation.linaro.org/lava-server/RPC2/",
- "stream": "/anonymous/testresult/"
- }
- }
- ]
-}
=== modified file 'doc/jobfile.rst'
@@ -49,88 +49,6 @@
]
}
-Linaro Ubuntu Images with new kernel
-====================================
-Here's an example showing how to test a new kernel, new kernel is specified by "kernel_matrix". First parameter is the deb package which contains a kernel, and second one is the prefix of the deb package which will be removed from existing rootfs before installing the first deb::
-
- {
- "job_name": "fpp",
- "target": "mx53loco01",
- "timeout": 6000,
- "actions": [
- {
- "command": "deploy_linaro_image",
- "parameters":
- {
- "rootfs": "http://snapshots.linaro.org/11.05-daily/linaro-nano/20110612/0/images/tar/nano-n-tar-20110612-0.tar.gz",
- "hwpack": "http://snapshots.linaro.org/11.05-daily/linaro-hwpacks/lt-mx53loco/20110609/0/images/hwpack/hwpack_linaro-lt-mx53loco_20110609-0_armel_supported.tar.gz",
- "kernel_matrix":["http://pkgserver/original/linux-image-2.6.38-1000-linaro-lt-mx5_2.6.38-1000.7_armel.deb", "linux-image-2.6.38"]
- }
- },
- {
- "command": "boot_linaro_image"
- },
- {
- "command": "submit_results",
- "parameters":
- {
- "server": "http://validation.linaro.org/lava-server/RPC2/",
- "stream": "/anonymous/testresult/"
- }
- }
- ]
- }
-
-And an example for Android images, it use a boot partition tarball specified by "pkg" directly, it will replace the files in tarball to boot partition::
-
- {
- "job_name": "android_new_kernel",
- "target": "panda01",
- "timeout": 18000,
- "actions": [
- {
- "command": "deploy_linaro_android_image",
- "parameters":
- {
- "boot": "https://android-build.linaro.org/jenkins/job/linaro-android_leb-panda/61/artifact/build/out/target/product/pandaboard/boot.tar.bz2",
- "system": "https://android-build.linaro.org/jenkins/job/linaro-android_leb-panda/61/artifact/build/out/target/product/pandaboard/system.tar.bz2",
- "data": "https://android-build.linaro.org/jenkins/job/linaro-android_leb-panda/61/artifact/build/out/target/product/pandaboard/userdata.tar.bz2",
- "pkg": "https://android-build.linaro.org/jenkins/job/linaro-android_leb-panda/171/artifact/build/out/target/product/pandaboard/boot.tar.bz2"
- },
- "metadata":
- {
- "rootfs.type": "android",
- "rootfs.build": "61"
- }
- },
- {
- "command": "boot_linaro_android_image"
- },
- {
- "command": "lava_android_test_install",
- "parameters":
- {
- "tests": ["0xbench"]
- }
- },
- {
- "command": "lava_android_test_run",
- "parameters":
- {
- "test_name": "0xbench"
- }
- },
- {
- "command": "submit_results_on_host",
- "parameters":
- {
- "server": "http://validation.linaro.org/lava-server/RPC2/",
- "stream": "/anonymous/android-panda01-basic/"
- }
- }
- ]
- }
-
Linaro Android Images
=====================
=== modified file 'lava_dispatcher/actions/android_deploy.py'
@@ -32,14 +32,13 @@
'boot': {'type': 'string'},
'system': {'type': 'string'},
'data': {'type': 'string'},
- 'pkg': {'type': 'string', 'optional': True},
'rootfstype': {'type': 'string', 'optional': True, 'default': 'ext4'},
},
'additionalProperties': False,
}
- def run(self, boot, system, data, pkg=None, rootfstype='ext4'):
+ def run(self, boot, system, data, rootfstype='ext4'):
if not isinstance(self.client, LavaMasterImageClient) and \
not isinstance(self.client, LavaFastModelClient):
raise RuntimeError("Invalid LavaClient for this action")
- self.client.deploy_linaro_android(boot, system, data, pkg, rootfstype)
+ self.client.deploy_linaro_android(boot, system, data, rootfstype)
=== modified file 'lava_dispatcher/actions/deploy.py'
@@ -43,7 +43,6 @@
## 'properties': {
## 'hwpack': {'type': 'string'},
## 'rootfs': {'type': 'string'},
- ## 'kernel_matrix': {'type': 'string', 'optional': True},
## 'rootfstype': {'type': 'string', 'optional': True, 'default': 'ext3'},
## },
## 'additionalProperties': False,
@@ -57,7 +56,6 @@
'hwpack': {'type': 'string', 'optional': True},
'rootfs': {'type': 'string', 'optional': True},
'image': {'type': 'string', 'optional': True},
- 'kernel_matrix': {'type': 'string', 'optional': True},
'rootfstype': {'type': 'string', 'optional': True},
},
'additionalProperties': False,
@@ -73,16 +71,12 @@
raise ValueError('cannot specify image and hwpack')
elif 'image' not in parameters:
raise ValueError('must specify image if not specifying a hwpack')
- elif 'kernel_matrix' in parameters:
- raise ValueError('cannot specify kernel_matrix with an image')
- def run(self, hwpack=None, rootfs=None, image=None, kernel_matrix=None,
- rootfstype='ext3'):
+ def run(self, hwpack=None, rootfs=None, image=None, rootfstype='ext3'):
if not isinstance(self.client, LavaMasterImageClient) and \
not isinstance(self.client, LavaQEMUClient) and \
not isinstance(self.client, LavaFastModelClient):
raise RuntimeError("Invalid LavaClient for this action")
self.client.deploy_linaro(
- hwpack=hwpack, rootfs=rootfs, image=image,
- kernel_matrix=kernel_matrix, rootfstype=rootfstype)
+ hwpack=hwpack, rootfs=rootfs, image=image, rootfstype=rootfstype)
=== modified file 'lava_dispatcher/client/fastmodel.py'
@@ -129,8 +129,7 @@
self._axf = '%s/%s' % (odir, os.path.split(src)[1])
shutil.copyfile(src, self._axf)
- def deploy_linaro_android(self, boot, system, data, pkg=None,
- rootfstype='ext4'):
+ def deploy_linaro_android(self, boot, system, data, rootfstype='ext4'):
logging.info("Deploying Android on %s" % self.hostname)
self._boot = download_image(boot, self.context, decompress=False)
@@ -147,7 +146,7 @@
self._customize_android()
def deploy_linaro(self, hwpack=None, rootfs=None, image=None,
- kernel_matrix=None, rootfstype='ext3'):
+ rootfstype='ext3'):
if image is None:
if hwpack is None or rootfs is None:
raise CriticalError(
=== modified file 'lava_dispatcher/client/lmc_utils.py'
@@ -4,11 +4,9 @@
import pexpect
import re
import os
-import shutil
from tempfile import mkdtemp
import sys
-from lava_dispatcher.client.base import CriticalError
from lava_dispatcher.downloader import (
download_image,
)
@@ -16,58 +14,16 @@
logging_system,
)
-def _refresh_hwpack(client, tarball_dir, kernel_matrix, hwpack):
- logging.info("Deploying new kernel")
- new_kernel = kernel_matrix[0]
- deb_prefix = kernel_matrix[1]
- filesuffix = new_kernel.split(".")[-1]
-
- if filesuffix != "deb":
- raise CriticalError("New kernel only support deb kernel package!")
-
- # download package to local
- kernel_path = download_image(new_kernel, client.context, outdir, decompress=False)
- hwpack_path = download_image(hwpack, client.context, outdir, decompress=False)
-
- cmd = ("sudo linaro-hwpack-replace -t %s -p %s -r %s"
- % (hwpack_path, kernel_path, deb_prefix))
-
- rc, output = getstatusoutput(cmd)
- if rc:
- raise RuntimeError("linaro-hwpack-replace failed: %s" % output)
-
- #fix it:l-h-r doesn't make a output option to specify the output hwpack,
- #so it needs to do manually here
-
- #remove old hwpack and leave only new hwpack in tarball_dir
- os.remove(hwpack_path)
- hwpack_list = os.listdir(tarball_dir)
- for hp in hwpack_list:
- if hp.split(".")[-1] == "gz":
- new_hwpack_path = os.path.join(tarball_dir, hp)
- return new_hwpack_path
-
-
-def generate_image(client, hwpack_url, rootfs_url, kernel_matrix,
- outdir, rootfstype=None):
+
+def generate_image(client, hwpack_url, rootfs_url, outdir, rootfstype=None):
"""Generate image from a hwpack and rootfs url
:param hwpack_url: url of the Linaro hwpack to download
:param rootfs_url: url of the Linaro image to download
"""
- LAVA_IMAGE_TMPDIR = client.context.lava_image_tmpdir
- LAVA_IMAGE_URL = client.context.lava_image_url
logging.info("preparing to deploy on %s" % client.hostname)
logging.info(" hwpack: %s" % hwpack_url)
logging.info(" rootfs: %s" % rootfs_url)
- if kernel_matrix:
- logging.info(" package: %s" % kernel_matrix[0])
- hwpack_url = _refresh_hwpack(client, outdir, kernel_matrix, hwpack_url)
- #make new hwpack downloadable
- hwpack_url = hwpack_url.replace(LAVA_IMAGE_TMPDIR, '')
- hwpack_url = '/'.join(u.strip('/') for u in [
- LAVA_IMAGE_URL, hwpack_url])
- logging.info(" hwpack with new kernel: %s" % hwpack_url)
logging.info("Downloading the %s file" % hwpack_url)
hwpack_path = download_image(hwpack_url, client.context, outdir, decompress=False)
=== modified file 'lava_dispatcher/client/master.py'
@@ -134,7 +134,7 @@
_deploy_tarball_to_board(session, bootfs, '/mnt/boot')
session.run('umount /mnt/boot')
-def _deploy_linaro_android_testboot(session, boottbz2, pkgbz2=None):
+def _deploy_linaro_android_testboot(session, boottbz2):
logging.info("Deploying test boot filesystem")
session.run('umount /dev/disk/by-label/testboot', failok=True)
session.run('mkfs.vfat /dev/disk/by-label/testboot '
@@ -144,8 +144,6 @@
session.run('mount /dev/disk/by-label/testboot '
'/mnt/lava/boot')
_deploy_tarball_to_board(session, boottbz2, '/mnt/lava')
- if pkgbz2:
- _deploy_tarball_to_board(session, pkgbz2, '/mnt/lava')
_recreate_uInitrd(session)
@@ -476,8 +474,7 @@
shutil.copy(boot_tgz, c_boot_tgz)
shutil.copy(root_tgz, c_root_tgz)
- def deploy_linaro(self, hwpack=None, rootfs=None, image=None,
- kernel_matrix=None, rootfstype='ext3'):
+ def deploy_linaro(self, hwpack=None, rootfs=None, image=None, rootfstype='ext3'):
LAVA_IMAGE_TMPDIR = self.context.lava_image_tmpdir
LAVA_IMAGE_URL = self.context.lava_image_url
# validate in parameters
@@ -486,7 +483,7 @@
raise CriticalError(
"must specify both hwpack and rootfs when not specifying image")
else:
- if hwpack is not None or rootfs is not None or kernel_matrix is not None:
+ if hwpack is not None or rootfs is not None:
raise CriticalError(
"cannot specify hwpack or rootfs when specifying image")
@@ -494,8 +491,7 @@
try:
tarball_dir = self.get_www_scratch_dir()
if image is None:
- image_file = generate_image(self, hwpack, rootfs,
- kernel_matrix, tarball_dir)
+ image_file = generate_image(self, hwpack, rootfs, tarball_dir)
boot_tgz, root_tgz = self._generate_tarballs(image_file)
else:
os.chmod(tarball_dir, 0755)
@@ -560,7 +556,7 @@
self.sio.write(tb)
raise CriticalError("Deployment failed")
- def deploy_linaro_android(self, boot, system, data, pkg=None, rootfstype='ext4'):
+ def deploy_linaro_android(self, boot, system, data, rootfstype='ext4'):
LAVA_IMAGE_TMPDIR = self.context.lava_image_tmpdir
LAVA_IMAGE_URL = self.context.lava_image_url
logging.info("Deploying Android on %s" % self.hostname)
@@ -581,8 +577,8 @@
raise CriticalError("Unable to reach LAVA server, check network")
try:
- boot_tbz2, system_tbz2, data_tbz2, pkg_tbz2 = \
- self._download_tarballs(boot, system, data, pkg)
+ boot_tbz2, system_tbz2, data_tbz2 = \
+ self._download_tarballs(boot, system, data)
except:
logging.error("Unable to download artifacts for deployment")
tb = traceback.format_exc()
@@ -600,15 +596,8 @@
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 [
- LAVA_IMAGE_URL, pkg_tarball])
- else:
- pkg_url = None
-
try:
- _deploy_linaro_android_testboot(session, boot_url, pkg_url)
+ _deploy_linaro_android_testboot(session, boot_url)
_deploy_linaro_android_testrootfs(session, system_url, rootfstype)
_deploy_linaro_android_data(session, data_url)
if session.has_partition_with_label('userdata') and \
@@ -622,7 +611,7 @@
finally:
logging.info("Android image deployment exiting")
- def _download_tarballs(self, boot_url, system_url, data_url, pkg_url=None):
+ def _download_tarballs(self, boot_url, system_url, data_url):
"""Download tarballs from a boot, system and data tarball url
:param boot_url: url of the Linaro Android boot tarball to download
@@ -636,12 +625,8 @@
boot_path = download_image(boot_url, self.context, tarball_dir, decompress=False)
system_path = download_image(system_url, self.context, tarball_dir, decompress=False)
data_path = download_image(data_url, self.context, tarball_dir, decompress=False)
- if pkg_url:
- pkg_path = download_image(pkg_url, self.context, tarball_dir, decompress=False)
- else:
- pkg_path = None
logging.info("Downloaded the image files")
- return boot_path, system_path, data_path, pkg_path
+ return boot_path, system_path, data_path
def boot_master_image(self):
"""
=== modified file 'lava_dispatcher/client/qemu.py'
@@ -47,11 +47,10 @@
super(LavaQEMUClient, self).__init__(context, config)
self._lava_image = None
- def deploy_linaro(self, hwpack=None, rootfs=None, image=None, kernel_matrix=None, rootfstype='ext3'):
+ def deploy_linaro(self, hwpack=None, rootfs=None, image=None, rootfstype='ext3'):
if image is None:
odir = self.get_www_scratch_dir()
- image_file = generate_image(self, hwpack, rootfs, kernel_matrix,
- odir, rootfstype)
+ image_file = generate_image(self, hwpack, rootfs, odir, rootfstype)
else:
image_file = download_image(image, self.context)
self._lava_image = image_file