diff options
Diffstat (limited to 'jjb/common')
-rw-r--r-- | jjb/common/include-agl-bitbake-sdk.sh | 3 | ||||
-rw-r--r-- | jjb/common/include-agl-lava-jobs-submit-only.sh | 26 | ||||
-rw-r--r-- | jjb/common/include-agl-run-test-short-flounder.sh | 35 |
3 files changed, 63 insertions, 1 deletions
diff --git a/jjb/common/include-agl-bitbake-sdk.sh b/jjb/common/include-agl-bitbake-sdk.sh index 9928bec3..f84fcb9b 100644 --- a/jjb/common/include-agl-bitbake-sdk.sh +++ b/jjb/common/include-agl-bitbake-sdk.sh @@ -4,8 +4,9 @@ ################################################################################ ## bitbake the sdk ################################################################################ - +if ! test x"${GERRIT_BRANCH}" = x"dab" ; then bitbake wic-tools +fi # finally, build the agl-demo-platform (we retry to catch the tar-native bug) #( ( bitbake -c $TARGETSDK $TARGETIMAGE ) || ( echo '## Failed once, retry .. ##' ; sync ; sleep 2 ; bitbake -c $TARGETSDK $TARGETIMAGE ) ) || ( echo '## Failed again, bail out ... ##' ; exit 1 ) diff --git a/jjb/common/include-agl-lava-jobs-submit-only.sh b/jjb/common/include-agl-lava-jobs-submit-only.sh new file mode 100644 index 00000000..a8354390 --- /dev/null +++ b/jjb/common/include-agl-lava-jobs-submit-only.sh @@ -0,0 +1,26 @@ +# (c) 2017 Kevin Hilman <khilman@baylibre.com> +# License GPLv2 +# +# Submit LAVA YAML job file (default testjob.yaml) to first available LAVA lab +# with matching device-type +# +JOB_FILE=${1:-testjob.yaml} + +if [ ! -e $JOB_FILE ]; then + echo "ERROR: LAVA job file $JOB_FILE not present." + exit 1 +fi +JOB_BASE=$(basename $JOB_FILE .yaml) + +# Need to hack the LAVA device-type name in the job file +JOB_FILE_NEW="${JOB_BASE}_${LAVA_LAB}.yaml" +cat $JOB_FILE | sed "s/device_type: $releng_device$/device_type: $lava_device/" > $JOB_FILE_NEW + +# +# LAVA job submit, get job ID from lava-tool output +# +JOB_STATUS="${JOB_BASE}_${LAVA_LAB}.status" +lava-tool submit-job --block $full_url $JOB_FILE_NEW |tee $JOB_STATUS +# Printing the job URL in the log +grep "submitted as job:" $JOB_STATUS + diff --git a/jjb/common/include-agl-run-test-short-flounder.sh b/jjb/common/include-agl-run-test-short-flounder.sh new file mode 100644 index 00000000..0b2edfb0 --- /dev/null +++ b/jjb/common/include-agl-run-test-short-flounder.sh @@ -0,0 +1,35 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Run SHORT CI test +################################################################################ + +set -x + +cd $REPODIR + +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+="--build-type release " +#[[ ! -z $RELEASE_BRANCH ]] && CREATE_ARGS+="--branch $RELEASE_BRANCH " +#[[ ! -z $RELEASE_VERSION ]] && CREATE_ARGS+="--version $RELEASE_VERSION " +CREATE_ARGS+="--url https://download.automotivelinux.org/AGL/upload/ci/${RELEASE_BRANCH}/${RELEASE_VERSION}/${MACHINE}/deploy/images/${MACHINE}/ " +BUILD_VERSION="AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION" +[[ -e output/repo-manifest-r.txt.sha1 ]] && BUILD_VERSION+="-$(cat output/repo-manifest-r.txt.sha1)" +CREATE_ARGS+="--name AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION " +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 ${releng_device}: LAVA job creation failed." + exit 0 +else + cat testjob.yaml +fi |