diff options
author | Kevin Hilman <khilman@baylibre.com> | 2017-06-26 22:03:14 +0000 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2017-08-04 17:56:12 +0000 |
commit | 7004b817e15611dbea71df2ce75216fdf462da2c (patch) | |
tree | 37417c5a5bb089581c28a01d40f0a3a3b4ed6713 /jjb/common | |
parent | 89ed03180ef57da85feade45da507e62b5af9c49 (diff) |
jjb/common: LAVA submit: : support device-type alternate names
The LAVA device types used in AGL lab are different than the standard
LAVA device-type names (which tend to follow naming conventions from
the upstream linux kernel device-tree names.)
This patch enables a way to have a table of alternate names, using the
rpi3 as an example.
Change-Id: Ic52d124047ef1c831c992c5671b1ad4b7d5f51ab
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'jjb/common')
-rw-r--r-- | jjb/common/include-agl-lava-jobs-submit.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/jjb/common/include-agl-lava-jobs-submit.sh b/jjb/common/include-agl-lava-jobs-submit.sh index 8de2c78a..d8578d39 100644 --- a/jjb/common/include-agl-lava-jobs-submit.sh +++ b/jjb/common/include-agl-lava-jobs-submit.sh @@ -14,11 +14,20 @@ JOB_BASE=$(basename $JOB_FILE .yaml) # find device_type from job file line=$(grep ^device_type: $JOB_FILE | tr -d '[:space:]') -device_type=${line/device_type:/} -echo "Found device_type $device_type in LAVA job $JOB_FILE" +__device_type=${line/device_type:/} +echo "Found device_type $__device_type in LAVA job $JOB_FILE" + +declare -A dt_aliases +dt_aliases=( + [raspberrypi3-uboot]="bcm2837-rpi-3-b" +) +device_types=$__device_type +device_types+=" " +device_types+=${dt_aliases[$__device_type]} # iterate over available labs for lab in "${!labs[@]}"; do + for device_type in $device_types; do val=${labs[$lab]} OFS=${IFS} IFS=';' @@ -56,12 +65,16 @@ for lab in "${!labs[@]}"; do else echo " Found and available. Status: $device_status" fi + + # Need to hack the real device-type name in the job file + JOB_FILE_NEW="${JOB_BASE}_${lab}.yaml" + cat $JOB_FILE | sed "s/device_type: $__device_type/device_type: $device_type/" > $JOB_FILE_NEW # # LAVA job submit, get job ID and status from lava-tool output # JOB_STATUS="${JOB_BASE}_${lab}.status" - lava-tool submit-job --block $full_url $JOB_FILE |tee $JOB_STATUS + lava-tool submit-job --block $full_url $JOB_FILE_NEW |tee $JOB_STATUS IFS=':' line=$(grep "job id" $JOB_STATUS | tr -d '[:space:]') @@ -93,7 +106,9 @@ for lab in "${!labs[@]}"; do else continue fi + done done # if we get here, none of the labs had a successful completion exit 1 + |