diff options
author | 2017-12-07 20:06:27 +0000 | |
---|---|---|
committer | 2017-12-07 20:06:27 +0000 | |
commit | 94c6dd2df2bb0915af54f64794aa4aa1260575f2 (patch) | |
tree | c945fcef6751eaa17e8385903506d2b2f17d6c45 /jjb/common/include-agl-run-test-prepare.sh | |
parent | f28a1005057b096a95ba73bc3bf3e029b835deaa (diff) |
Revert "jjb/common: remove hwtest.enable files"
Issues with the jobs.
This reverts commit f28a1005057b096a95ba73bc3bf3e029b835deaa.
Change-Id: Icf75e5b462b0d4aff3c8d2c5806b8ca9270ad22b
Diffstat (limited to 'jjb/common/include-agl-run-test-prepare.sh')
-rw-r--r-- | jjb/common/include-agl-run-test-prepare.sh | 65 |
1 files changed, 53 insertions, 12 deletions
diff --git a/jjb/common/include-agl-run-test-prepare.sh b/jjb/common/include-agl-run-test-prepare.sh index 304b74e9..1613bdcf 100644 --- a/jjb/common/include-agl-run-test-prepare.sh +++ b/jjb/common/include-agl-run-test-prepare.sh @@ -24,22 +24,63 @@ if [ -e releng-scripts/utils ]; then RELENG=$PWD/releng-scripts fi -CREATE_ARGS="" -CREATE_ARGS+="--machine ${MACHINE} " +ls -alhR meta-agl/templates/machine/${MACHINE} -# If ii's a release build -if [[ ! -z $RELEASE_BRANCH ]] && [[ ! -z $RELEASE_VERSION ]]; then - CREATE_ARGS+="--build-type {release,$RELEASE_BRANCH,$RELEASE_VERSION} " +#### 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 fi -# If it's a CI build -if [[ ! -z $GERRIT_CHANGE_NUMBER ]] && [[ ! -z $GERRIT_PATCHSET_NUMBER ]]; then - CREATE_ARGS+="--build-type {ci,$GERRIT_CHANGE_NUMBER,$GERRIT_PATCHSET_NUMBER} " + +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 +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 +fi + +if [ ! -f $ENVFILE ] ; then + echo "No short HW test environment file available for ${MACHINE}." + echo "Add ${ENVFILE} to enable." + exit 1 fi -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` +# 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_ + # echo NEXT is rsync #exit 0 |