diff options
author | Kevin Hilman <khilman@baylibre.com> | 2017-09-21 21:48:25 +0000 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2017-09-21 21:51:59 +0000 |
commit | 2859ba9f61f8a8f43bcfffb9662ca7fbc0322e4c (patch) | |
tree | 2abc69ddcb70cab999743a5706496e39d8503c89 /jjb | |
parent | b136296de2f83879300b78319c5502f6f43b2805 (diff) |
LAVA jobs: create jobs using releng
Switch to using releng-scripts "create-jobs" util for creating LAVA
jobs from new templating system.
For beta-testing, only use for QEMU and m3ulcb for now
(Yes, the if/else/endif without nesting is ugly, but makes the
patch easier to read without all the whitespace change for
indents. Whitespace can be updated in a follow-up if this
change is accepted.)
Change-Id: I46c4f97927515c1772fdef9842f041ef2be60000
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/common/include-agl-run-test-prepare.sh | 9 | ||||
-rw-r--r-- | jjb/common/include-agl-run-test-short.sh | 15 |
2 files changed, 22 insertions, 2 deletions
diff --git a/jjb/common/include-agl-run-test-prepare.sh b/jjb/common/include-agl-run-test-prepare.sh index f67262d4..1613bdcf 100644 --- a/jjb/common/include-agl-run-test-prepare.sh +++ b/jjb/common/include-agl-run-test-prepare.sh @@ -13,9 +13,15 @@ set -x cd $REPODIR # clone repo for templates and related utils, add to $PATH for later use -git clone --branch release https://git.automotivelinux.org/AGL/releng-scripts +if [ ! -e releng-scripts ]; then + git clone --branch release https://git.automotivelinux.org/AGL/releng-scripts +else + (cd releng-scripts; git remote update; git checkout -f origin/release) +fi + if [ -e releng-scripts/utils ]; then export PATH=$PATH:$PWD/releng-scripts/utils + RELENG=$PWD/releng-scripts fi ls -alhR meta-agl/templates/machine/${MACHINE} @@ -78,4 +84,3 @@ set | grep DEVICE_ # echo NEXT is rsync #exit 0 - diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh index da12802a..3d021675 100644 --- a/jjb/common/include-agl-run-test-short.sh +++ b/jjb/common/include-agl-run-test-short.sh @@ -11,6 +11,20 @@ set -x echo "## ${MACHINE} ##" cd $REPODIR +# WIP: use $RELENG for subset of boards +__MACHINE=${MACHINE%-nogfx} # releng doesn't care +if [ ! -z $RELENG ] && \ + (( x$__MACHINE == x"qemux86-64" || \\ + x$__MACHINE == x"m3ulcb" )); then + CREATE_ARGS="" + [[ ! -z $GERRIT_CHANGE_NUMBER ]] && CREATE_ARGS+="-j $GERRIT_CHANGE_NUMBER " + [[ ! -z $GERRIT_PATCHSET_NUMBER ]] && CREATE_ARGS+="-i $GERRIT_PATCHSET_NUMBER " + [[ ! -z $TARGETIMAGE ]] && CREATE_ARGS+="--img-name $TARGETIMAGE --img-ext ext4.xz " + CREATE_ARGS+="--test smoke -- " + $RELENG/utils/create-jobs.py ${CREATE_ARGS} ${__MACHINE} > testjob.yaml + cat testjob.yaml +else + cat <<EOF > testjob.yaml # Your first LAVA JOB definition for a $MACHINE board device_type: @REPLACE_DEVICE_TYPE@ @@ -122,3 +136,4 @@ sed -i -e "s#@REPLACE_KERNEL_CMDLINE@#${DEVICE_KERNEL_CMDLINE}#g" testjob.yaml cat testjob.yaml +fi |