aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common/include-agl-run-test-prepare.sh
diff options
context:
space:
mode:
authorLoys Ollivier <lollivier@baylibre.com>2017-12-01 10:59:03 +0100
committerLoys Ollivier <lollivier@baylibre.com>2017-12-08 16:21:13 +0100
commitcc12309dd23b7f76d310c69d4412ab7afb33ef1f (patch)
tree0fc4047e6dbd2a4d8340ba89220771d496c9a383 /jjb/common/include-agl-run-test-prepare.sh
parent2b276d21d3a419b60f4d04c6fef9a0cd02a01636 (diff)
jjb/common: remove hwtest.enable files v2
releng-scripts now supports LAVA job generation for all boards. Remove the check in run-test-prepare.sh on whether or not to create LAVA test jobs. Replace this test by several exports using releng-scripts job-prereq tool. These exports will be used to rsync the files to the CI upload server. If the calls to job-prereq returns an error, make the script fail gracefully. Transition all platforms in run-test-short.sh to use releng-scripts. Transition all platforms in run-test-short-release.sh to use releng scripts. JIRA: SPEC-1144 Change-Id: I1e0e6d39b986770adcdfcf92c5d589a7fbe99a33 Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
Diffstat (limited to 'jjb/common/include-agl-run-test-prepare.sh')
-rw-r--r--jjb/common/include-agl-run-test-prepare.sh69
1 files changed, 17 insertions, 52 deletions
diff --git a/jjb/common/include-agl-run-test-prepare.sh b/jjb/common/include-agl-run-test-prepare.sh
index 1613bdcf..2c6611d9 100644
--- a/jjb/common/include-agl-run-test-prepare.sh
+++ b/jjb/common/include-agl-run-test-prepare.sh
@@ -24,63 +24,28 @@ if [ -e releng-scripts/utils ]; then
RELENG=$PWD/releng-scripts
fi
-ls -alhR meta-agl/templates/machine/${MACHINE}
+CREATE_ARGS=""
+CREATE_ARGS+="--machine ${MACHINE} "
-#### Find out if machine can be tested.
-#### We keep a stamp file in meta-agl/templates/machine/$MACHINE/test
-if [ ! -d meta-agl/templates/machine/${MACHINE}/test ]; then
- echo "No HW test templates for ${MACHINE} configured."
- echo "Add meta-agl/templates/machine/${MACHINE}/test/ and its contents to enable"
- exit 0
+# If it's a release build
+if [[ $RELEASE_BRANCH ]] && [[ $RELEASE_VERSION ]]; then
+ CREATE_ARGS+="--build-type release $RELEASE_BRANCH $RELEASE_VERSION "
fi
-
-if [ ! -f meta-agl/templates/machine/${MACHINE}/test/hwtest.enable ] ; then
- echo "No HW test for ${MACHINE} configured."
- echo "Add meta-agl/templates/machine/${MACHINE}/test/hwtest.enable to enable"
- exit 0
+# If it's a CI build
+if [[ $GERRIT_CHANGE_NUMBER ]] && [[ $GERRIT_PATCHSET_NUMBER ]]; then
+ CREATE_ARGS+="--build-type ci $GERRIT_CHANGE_NUMBER $GERRIT_PATCHSET_NUMBER "
fi
-if [ ! -f meta-agl/templates/machine/${MACHINE}/test/hwtest.short.enable ] ; then
- echo "No short HW test for ${MACHINE} configured."
- echo "Add meta-agl/templates/machine/${MACHINE}/test/hwtest.enable.short to enable"
-else
- eval export ENVFILE=meta-agl/templates/machine/${MACHINE}/test/hwtest.short.environment
+$RELENG/utils/job-prereq.py ${CREATE_ARGS}
+if [ $? -ne 0 ]; then
+ echo "Board not supported by releng-scripts: job-prereq.py"
+ exit 0
fi
-
-if [ ! -f $ENVFILE ] ; then
- echo "No short HW test environment file available for ${MACHINE}."
- echo "Add ${ENVFILE} to enable."
- exit 1
-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
-#export DEVICE_BOOT_TYPE=bootm
-export DEVICE_URL_PREFIX='https://download.automotivelinux.org/AGL/upload/ci/'
-
-
-# import device defaults. Format 'a=b'
-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}
- else
- echo "Variable ${i} missing in environment file $ENVFILE"
- fi
-done
-
-echo "Resulting values:"
-set | grep DEVICE_
-
+# First call to job-prereq suceeded, other should suceed as they use the same args.
+export DEVICE_DTB=`$RELENG/utils/job-prereq.py ${CREATE_ARGS} --dtb`
+export DEVICE_KERNEL=`$RELENG/utils/job-prereq.py ${CREATE_ARGS} --kernel`
+export DEVICE_INITRAMFS=`$RELENG/utils/job-prereq.py ${CREATE_ARGS} --initrd`
+export DEVICE_NBDROOT=`$RELENG/utils/job-prereq.py ${CREATE_ARGS} --nbdroot`
# echo NEXT is rsync
#exit 0