aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/common/include-agl-run-test-prepare.sh6
-rw-r--r--jjb/common/include-agl-run-test-short.sh50
2 files changed, 50 insertions, 6 deletions
diff --git a/jjb/common/include-agl-run-test-prepare.sh b/jjb/common/include-agl-run-test-prepare.sh
index 388fb535..4d3f10f6 100644
--- a/jjb/common/include-agl-run-test-prepare.sh
+++ b/jjb/common/include-agl-run-test-prepare.sh
@@ -4,7 +4,7 @@
################################################################################
## Run SHORT CI test
################################################################################
-#set -x
+set -x
#ls -alh
#pwd
@@ -42,11 +42,13 @@ if [ ! -f $ENVFILE ] ; then
fi
# some defaults
+export DEVICE_ARCH=arm
export DEVICE_TYPE=raspberrypi3-uboot
export DEVICE_NAME=raspberrypi3
export DEVICE_DTB=uImage-bcm2710-rpi-3-b.dtb
export DEVICE_KERNEL=uImage
export DEVICE_INITRAMFS=initramfs-netboot-image-raspberrypi3.ext4
+export DEVICE_INITRAMFS_COMPRESSION=false
export DEVICE_NBDROOT=agl-demo-platform-raspberrypi3.ext4
export DEVICE_NBDROOT_COMPRESSION=false
export DEVICE_BOOT_METHOD=u-boot
@@ -55,7 +57,7 @@ export DEVICE_URL_PREFIX='https://download.automotivelinux.org/AGL/upload/ci/'
# import device defaults. Format 'a=b'
-for i in DEVICE_TYPE DEVICE_NAME DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT DEVICE_NBDROOT_COMPRESSION DEVICE_BOOT_METHOD DEVICE_BOOT_TYPE DEVICE_URL_PREFIX; do
+for i in DEVICE_ARCH DEVICE_TYPE DEVICE_NAME DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_INITRAMFS_COMPRESSION DEVICE_NBDROOT DEVICE_NBDROOT_COMPRESSION DEVICE_BOOT_METHOD DEVICE_BOOT_TYPE DEVICE_URL_PREFIX DEVICE_QEMU_ARGS DEVICE_KERNEL_CMDLINE; do
if grep -q ^$i $ENVFILE ; then
X=$(grep $i $ENVFILE | sed -e "s#${i}=##g" -e "s#;.*##g")
eval export ${i}=${X}
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