diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/common/include-agl-lava-jobs-submit.sh | 6 | ||||
-rw-r--r-- | jjb/common/include-agl-lava-labs-prepare.sh | 73 | ||||
-rw-r--r-- | jjb/common/include-agl-run-test-prepare.sh | 89 | ||||
-rw-r--r-- | jjb/common/include-agl-run-test-short-release.sh | 130 | ||||
-rw-r--r-- | jjb/common/include-agl-run-test-short.sh | 154 |
5 files changed, 129 insertions, 323 deletions
diff --git a/jjb/common/include-agl-lava-jobs-submit.sh b/jjb/common/include-agl-lava-jobs-submit.sh index 94cc6586..0eccbf6a 100644 --- a/jjb/common/include-agl-lava-jobs-submit.sh +++ b/jjb/common/include-agl-lava-jobs-submit.sh @@ -31,7 +31,8 @@ job_id=$(grep "submitted as job:" $JOB_STATUS | sed 's/.*\/\([0-9]*$\)/\1/') lava-tool job-details $full_url $job_id | tee $JOB_STATUS IFS=':' -line=$(grep "^status:" $JOB_STATUS | tr -d '[:space:]') +line=$(grep "^status:" $JOB_STATUS) +line=$(echo "$line" | tr -d '[:space:]') arr=($line) status=${arr[1]} IFS=${OFS} @@ -44,8 +45,9 @@ echo "####" JOB_OUTPUT="${JOB_BASE}_output.yaml" JOB_LOG="${JOB_BASE}_output.log" -curl -s -o $JOB_OUTPUT $full_url/scheduler/job/$job_id/log_file/plain +curl -s -o $JOB_OUTPUT $lava_url/scheduler/job/$job_id/log_file/plain cat $JOB_OUTPUT | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g' | tee $JOB_LOG +cat $JOB_OUTPUT | grep '"error_msg":' | sed -e 's#.*"error_msg": "##g' -e 's#", ".*##g' | tee -a $JOB_LOG echo "####" echo "#### End: Output from LAVA job $job_id ####" diff --git a/jjb/common/include-agl-lava-labs-prepare.sh b/jjb/common/include-agl-lava-labs-prepare.sh index 938dcbe6..8a40704a 100644 --- a/jjb/common/include-agl-lava-labs-prepare.sh +++ b/jjb/common/include-agl-lava-labs-prepare.sh @@ -10,6 +10,10 @@ # # Strucuture: [JENKINS_LAB_NAME]="LAB_URL;JENKINS_LAB_USER;JENKINS_LAB_TOKEN;RELENG_LAB_NAME" # + +# Let the script handle errors nicely +set +e + declare -A labs labs=( [agl]="https://lava.automotivelinux.org/;$LAB_AGL_USER;$LAB_AGL_TOKEN;lab-agl-core" @@ -17,9 +21,6 @@ labs=( # [baylibre_seattle]="http://lava.ished.com/;$LAB_BAYLIBRE_SEATTLE_USER;$LAB_BAYLIBRE_SEATTLE_TOKEN" ) -echo "## ${MACHINE} ##" -__MACHINE=${MACHINE%-nogfx} - # # Ensure python_keyring is set to plaintext. Required for # non-interactive use @@ -31,23 +32,6 @@ cat <<EOF > ~/.local/share/python_keyring/keyringrc.cfg default-keyring=keyring.backends.file.PlaintextKeyring EOF -declare -A agl_lava_releng_aliases -agl_lava_releng_aliases=( - [raspberrypi3]="raspberrypi3-uboot;raspberrypi3" - [qemux86-64]="qemu;qemux86-64" - [m3ulcb-nogfx]="r8a7796-m3ulcb;m3ulcb" - [porter-nogfx]="renesas-porter;renesas-porter" - [dra7xx-evm]="dra7-evm;dra7xx-evm" -) - -OFS=${IFS} -IFS=';' -arr=(${agl_lava_releng_aliases[$MACHINE]}) -IFS=${OFS} -lava_device=${arr[0]} -releng_device=${arr[1]} -# And agl_device=${MACHINE} - device_available=0 for lab in "${!labs[@]}"; do val=${labs[$lab]} @@ -72,7 +56,8 @@ for lab in "${!labs[@]}"; do fi # LAVA URL with username - full_url=${url/:\/\//:\/\/${user}\@} + lava_url=${url/:\/\//:\/\/${user}\@} + full_url=${lava_url} full_url+="RPC2/" # entry point for XML-RPC API echo "LAVA auth-add for lab: $lab, URL: $full_url" @@ -87,7 +72,9 @@ for lab in "${!labs[@]}"; do # Find the LAVA Lab that has the device available to run the job echo -n "Checking for $lava_device at $full_url... " - line=$(lava-tool devices-list $full_url |grep $lava_device | tr -d '[:space:]') + line=$(lava-tool devices-list $full_url | grep $lava_device) + line=$(echo "$line" | tr -d '[:space:]') + if [ -z "$line" ]; then echo "not found." continue @@ -97,14 +84,41 @@ for lab in "${!labs[@]}"; do device_status=${arr[2]} IFS=${OFS} - # device is only available if "idle" or "running" - device_available=0 - if [ x"$device_status" = x"idle" ]; then - device_available=1 - elif [ x"$device_status" = x"running" ]; then - device_available=1; + if [ x"$device_status" = x"reserved" ]; then + retries=10 + else + retries=1 fi + # If the device is reserved poll it's status every minutes. + # The max polling time is set to $retries * 60 seconds = 10 minutes. + for i in `seq 1 $retries` + do + # device is only available if "idle" or "running" + device_available=0 + if [ x"$device_status" = x"idle" ]; then + device_available=1 + break + elif [ x"$device_status" = x"running" ]; then + device_available=1; + break + fi + sleep 60s + # Find the LAVA Lab that has the device available to run the job + echo -n "Checking for $lava_device at $full_url... " + line=$(lava-tool devices-list $full_url | grep $lava_device) + line=$(echo "$line" | tr -d '[:space:]') + + if [ -z "$line" ]; then + echo "not found." + continue + fi + IFS='|' + arr=($line) + device_status=${arr[2]} + IFS=${OFS} + done + if [ $device_available = 0 ]; then echo " Not Available. Status: $device_status" continue @@ -120,3 +134,6 @@ if [ "$device_available" -eq 0 ]; then echo "ERROR: device not found in any available lab." exit 0 fi + +# Re-enable error detection +set -e diff --git a/jjb/common/include-agl-run-test-prepare.sh b/jjb/common/include-agl-run-test-prepare.sh index 1613bdcf..f0701bfc 100644 --- a/jjb/common/include-agl-run-test-prepare.sh +++ b/jjb/common/include-agl-run-test-prepare.sh @@ -24,63 +24,50 @@ if [ -e releng-scripts/utils ]; then RELENG=$PWD/releng-scripts fi -ls -alhR meta-agl/templates/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 +declare -A agl_lava_releng_aliases +agl_lava_releng_aliases=( + [raspberrypi3]="raspberrypi3-uboot;raspberrypi3" + [qemux86-64]="qemu;qemux86-64" + [m3ulcb-nogfx]="r8a7796-m3ulcb;m3ulcb" + [porter-nogfx]="renesas-porter;renesas-porter" + [dra7xx-evm]="dra7-evm;dra7xx-evm" +) + +OFS=${IFS} +IFS=';' +arr=(${agl_lava_releng_aliases[$MACHINE]}) +IFS=${OFS} +lava_device=${arr[0]} +releng_device=${arr[1]} +# And agl_device=${MACHINE} + +if [ -z "${lava_device}" -o -z "${releng_device}" ]; then + echo "Board not supported: $MACHINE" + exit 0 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 -fi +CREATE_ARGS="" +CREATE_ARGS+="--machine ${releng_device} " -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 +# If it's a release build +if [[ $RELEASE_BRANCH ]] && [[ $RELEASE_VERSION ]]; then + CREATE_ARGS+="--build-type release $RELEASE_BRANCH $RELEASE_VERSION " fi - -if [ ! -f $ENVFILE ] ; then - echo "No short HW test environment file available for ${MACHINE}." - echo "Add ${ENVFILE} to enable." - exit 1 +# 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 -# 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_ - +$RELENG/utils/job-prereq.py ${CREATE_ARGS} +if [ $? -ne 0 ]; then + echo "Board not supported by releng-scripts: job-prereq.py" + exit 0 +fi +# 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 diff --git a/jjb/common/include-agl-run-test-short-release.sh b/jjb/common/include-agl-run-test-short-release.sh index f6388080..89992f85 100644 --- a/jjb/common/include-agl-run-test-short-release.sh +++ b/jjb/common/include-agl-run-test-short-release.sh @@ -5,118 +5,30 @@ ## Run SHORT CI test ################################################################################ +set -x -#set -x - -echo "## ${MACHINE} ##" cd $REPODIR -cat <<EOF > testjob.yaml -# Your first LAVA JOB definition for a $MACHINE board -device_type: @REPLACE_DEVICE_TYPE@ -job_name: AGL-${RELEASE_VERSION}-build-${BUILD_NUMBER} - -protocols: - lava-xnbd: - port: auto - -timeouts: - job: - minutes: 30 - action: - minutes: 15 - connection: - minutes: 5 -priority: medium -visibility: public - -# 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: - method: @REPLACE_BOOT_METHOD@ - commands: nbd - type: @REPLACE_BOOT_TYPE@ - prompts: ["root@@REPLACE_MACHINE@:~"] - auto_login: - login_prompt: "login:" - username: root - transfer_overlay: - download_command: wget - unpack_command: tar -C / -xvpf -- test: - definitions: - - repository: https://git.automotivelinux.org/src/qa-testdefinitions - from: git - path: test-suites/short-smoke/busybox.yaml - name: busybox - - repository: https://git.automotivelinux.org/src/qa-testdefinitions - from: git - path: test-suites/short-smoke/smoke-tests-basic.yaml - name: smoke-tests-basic - - repository: https://git.automotivelinux.org/src/qa-testdefinitions - from: git - path: test-suites/short-smoke/service-check.yaml - name: service-check -EOF - -CHID=${RELEASE_BRANCH}/${RELEASE_VERSION}/${MACHINE} -# REPLACE_DEVICE_TYPE -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_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 - -cat testjob.yaml - -lava-tool submit-job --block https://agl-jenkins-user@lava.automotivelinux.org testjob.yaml | tee .myjob - -MYJOB=`cat .myjob | grep "submitted as job" | sed -e "s#submitted as job id: ##g"` - -echo "#### JOBID: $MYJOB #####" - -( lava-tool job-status https://agl-jenkins-user@lava.automotivelinux.org $MYJOB | tee .status ) || true -STATUS=`grep "Job Status:" .status | sed -e "s#Job Status: ##g"` - -if [ x"Complete" = x"$STATUS" ] ; then - echo "YAY! $STATUS" - curl -o plain_output.yaml https://lava.automotivelinux.org/scheduler/job/$MYJOB/log_file/plain - cat plain_output.yaml | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g' - - # cleanup - #ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf /srv/download/AGL/upload/ci/${CHID}/ - +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 $RELEASE_BRANCH ]] && CREATE_ARGS+="--branch $RELEASE_BRANCH " +[[ ! -z $RELEASE_VERSION ]] && CREATE_ARGS+="--version $RELEASE_VERSION " +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 - echo "Nooooooooo! $STATUS" - curl -o plain_output.yaml https://lava.automotivelinux.org/scheduler/job/$MYJOB/log_file/plain - cat plain_output.yaml | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g' - - # cleanup - #ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf /srv/download/AGL/upload/ci/${CHID}/ - # exit 1 - exit 0 + cat testjob.yaml fi diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh index deeaf3c5..955d67d8 100644 --- a/jjb/common/include-agl-run-test-short.sh +++ b/jjb/common/include-agl-run-test-short.sh @@ -7,140 +7,28 @@ 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-$GERRIT_CHANGE_NUMBER-$GERRIT_PATCHSET_NUMBER " +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 <<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 |