aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common/include-agl-run-test-short.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/common/include-agl-run-test-short.sh')
-rw-r--r--jjb/common/include-agl-run-test-short.sh50
1 files changed, 46 insertions, 4 deletions
diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh
index 28a40480..47757c6a 100644
--- a/jjb/common/include-agl-run-test-short.sh
+++ b/jjb/common/include-agl-run-test-short.sh
@@ -16,10 +16,6 @@ cat <<EOF > testjob.yaml
device_type: @REPLACE_DEVICE_TYPE@
job_name: AGL-short-smoke
-protocols:
- lava-xnbd:
- port: auto
-
timeouts:
job:
minutes: 30
@@ -29,6 +25,14 @@ timeouts:
minutes: 5
priority: medium
visibility: public
+EOF
+
+if [ ${DEVICE_BOOT_METHOD} = "u-boot" ]; then
+cat <<EOF >> testjob.yaml
+
+protocols:
+ lava-xnbd:
+ port: auto
# ACTION_BLOCK
actions:
@@ -60,19 +64,57 @@ actions:
username: root
EOF
+fi
+
+if [ ${DEVICE_BOOT_METHOD} = "qemu" ]; then
+cat <<EOF >>testjob.yaml
+context:
+ no_kvm: true
+ arch: @REPLACE_DEVICE_ARCH@
+ extra_options: [@REPLACE_QEMU_ARGS@]
+
+actions:
+- deploy:
+ timeout:
+ minutes: 3
+ to: tmpfs
+ os: oe
+ images:
+ kernel:
+ image_arg: '-kernel {kernel} -append @REPLACE_KERNEL_CMDLINE@'
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_KERNEL@'
+ ramdisk:
+ image_arg: '-drive format=raw,file={ramdisk}'
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_INITRAMFS@'
+ compression: @REPLACE_INITRAMFS_COMPRESSION@
+
+- boot:
+ method: @REPLACE_BOOT_METHOD@
+ media: tmpfs
+ prompts: ["root@@REPLACE_MACHINE@:~"]
+ auto_login:
+ login_prompt: "login:"
+ username: root
+
+EOF
+fi
CHID=${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}/${MACHINE}
# REPLACE_DEVICE_TYPE
+sed -i -e "s#@REPLACE_DEVICE_ARCH@#${DEVICE_ARCH}#g" testjob.yaml
sed -i -e "s#@REPLACE_DEVICE_TYPE@#${DEVICE_TYPE}#g" testjob.yaml
sed -i -e "s#@REPLACE_DTB@#${CHID}/${DEVICE_DTB}#g" testjob.yaml
sed -i -e "s#@REPLACE_KERNEL@#${CHID}/${DEVICE_KERNEL}#g" testjob.yaml
sed -i -e "s#@REPLACE_INITRAMFS@#${CHID}/${DEVICE_INITRAMFS}#g" testjob.yaml
+sed -i -e "s#@REPLACE_INITRAMFS_COMPRESSION@#${DEVICE_INITRAMFS_COMPRESSION}#g" testjob.yaml
sed -i -e "s#@REPLACE_NBDROOT@#${CHID}/${DEVICE_NBDROOT}#g" testjob.yaml
sed -i -e "s#@REPLACE_NBDROOT_COMPRESSION@#${DEVICE_NBDROOT_COMPRESSION}#g" testjob.yaml
sed -i -e "s#@REPLACE_BOOT_METHOD@#${DEVICE_BOOT_METHOD}#g" testjob.yaml
sed -i -e "s#@REPLACE_BOOT_TYPE@#${DEVICE_BOOT_TYPE}#g" testjob.yaml
sed -i -e "s#@REPLACE_MACHINE@#${DEVICE_NAME}#g" testjob.yaml
sed -i -e "s#@REPLACE_URL_PREFIX@#${DEVICE_URL_PREFIX}#g" testjob.yaml
+sed -i -e "s#@REPLACE_QEMU_ARGS@#${DEVICE_QEMU_ARGS}#g" testjob.yaml
+sed -i -e "s#@REPLACE_KERNEL_CMDLINE@#${DEVICE_KERNEL_CMDLINE}#g" testjob.yaml
cat testjob.yaml