diff options
author | 2017-12-01 10:59:03 +0100 | |
---|---|---|
committer | 2017-12-08 16:21:13 +0100 | |
commit | cc12309dd23b7f76d310c69d4412ab7afb33ef1f (patch) | |
tree | 0fc4047e6dbd2a4d8340ba89220771d496c9a383 /jjb/common/include-agl-run-test-short.sh | |
parent | 2b276d21d3a419b60f4d04c6fef9a0cd02a01636 (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-short.sh')
-rw-r--r-- | jjb/common/include-agl-run-test-short.sh | 152 |
1 files changed, 21 insertions, 131 deletions
diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh index deeaf3c5..58273b99 100644 --- a/jjb/common/include-agl-run-test-short.sh +++ b/jjb/common/include-agl-run-test-short.sh @@ -10,137 +10,27 @@ set -x echo "## ${MACHINE} ##" cd $REPODIR -# WIP: use $RELENG for subset of boards __MACHINE=${MACHINE%-nogfx} # releng doesn't care -if [ ! -z $RELENG ]; then - echo "# LAVA lab target: ${LAVA_LAB} #" - # releng-scripts depends on jinja2 >= 2.9 - echo "## Check version of python-jinja2: " - pip show jinja2 - CREATE_ARGS="" - CREATE_ARGS+="--machine ${releng_device} " - CREATE_ARGS+="--url ci " - [[ ! -z $GERRIT_CHANGE_NUMBER ]] && CREATE_ARGS+="--changeid $GERRIT_CHANGE_NUMBER " - [[ ! -z $GERRIT_PATCHSET_NUMBER ]] && CREATE_ARGS+="--patchset $GERRIT_PATCHSET_NUMBER " - BUILD_VERSION="AGL-gerrit-$GERRIT_CHANGE_NUMBER-$GERRIT_PATCHSET_NUMBER" - [[ -e output/repo-manifest-r.txt.sha1 ]] && BUILD_VERSION+="-$(cat output/repo-manifest-r.txt.sha1)" - CREATE_ARGS+="--name AGL-gerrit " - CREATE_ARGS+="--build-version $BUILD_VERSION " - CREATE_ARGS+="--callback-from ${LAVA_LAB} " - CREATE_ARGS+="--test all" - $RELENG/utils/create-jobs.py ${CREATE_ARGS} > testjob.yaml - cat testjob.yaml +echo "# LAVA lab target: ${LAVA_LAB} #" +# releng-scripts depends on jinja2 >= 2.9 +echo "## Check version of python-jinja2: " +pip show jinja2 +CREATE_ARGS="" +CREATE_ARGS+="--machine ${releng_device} " +CREATE_ARGS+="--url ci " +[[ ! -z $GERRIT_CHANGE_NUMBER ]] && CREATE_ARGS+="--changeid $GERRIT_CHANGE_NUMBER " +[[ ! -z $GERRIT_PATCHSET_NUMBER ]] && CREATE_ARGS+="--patchset $GERRIT_PATCHSET_NUMBER " +BUILD_VERSION="AGL-gerrit-$GERRIT_CHANGE_NUMBER-$GERRIT_PATCHSET_NUMBER" +[[ -e output/repo-manifest-r.txt.sha1 ]] && BUILD_VERSION+="-$(cat output/repo-manifest-r.txt.sha1)" +CREATE_ARGS+="--name AGL-gerrit " +CREATE_ARGS+="--build-version $BUILD_VERSION " +CREATE_ARGS+="--callback-from ${LAVA_LAB} " +CREATE_ARGS+="--test all" +$RELENG/utils/create-jobs.py ${CREATE_ARGS} > testjob.yaml + +if [ $? != 0 ]; then + echo "ERROR: Machine ${$__MACHINE}: LAVA job creation failed." + exit 0 else - -cat <<EOF > testjob.yaml -# Your first LAVA JOB definition for a $MACHINE board -device_type: @REPLACE_DEVICE_TYPE@ -job_name: AGL-short-smoke - -timeouts: - job: - minutes: 30 - action: - minutes: 15 - connection: - 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: -- deploy: - timeout: - minutes: 15 - to: nbd - dtb: - url: '@REPLACE_URL_PREFIX@/@REPLACE_DTB@' - kernel: - url: '@REPLACE_URL_PREFIX@/@REPLACE_KERNEL@' - initrd: - url: '@REPLACE_URL_PREFIX@/@REPLACE_INITRAMFS@' - allow_modify: false - nbdroot: - url: '@REPLACE_URL_PREFIX@/@REPLACE_NBDROOT@' - compression: @REPLACE_NBDROOT_COMPRESSION@ - os: debian - failure_retry: 2 - -# BOOT_BLOCK -- boot: - timeout: - minutes: 10 - method: @REPLACE_BOOT_METHOD@ - commands: nbd - type: @REPLACE_BOOT_TYPE@ - prompts: ["root@@REPLACE_MACHINE@:~"] - auto_login: - login_prompt: "login:" - username: root - -EOF -fi - -if [ ${DEVICE_BOOT_METHOD} = "qemu" ]; then -cat <<EOF >>testjob.yaml -context: - no_kvm: false - arch: @REPLACE_DEVICE_ARCH@ - extra_options: [@REPLACE_QEMU_ARGS@] - -actions: -- deploy: - timeout: - minutes: 15 - 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: - timeout: - minutes: 10 - 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 - + cat testjob.yaml fi |