jjb/common: clean up device names to standardized ones. 23/12423/1
authorLoys Ollivier <lollivier@baylibre.com>
Mon, 11 Dec 2017 10:33:22 +0000 (11:33 +0100)
committerLoys Ollivier <lollivier@baylibre.com>
Mon, 11 Dec 2017 10:33:22 +0000 (11:33 +0100)
Use the device_name table aliases earlier in the CI process. That way
all the scripts are using the correct device name. Avoiding name
mismatch resulting to CI failure.

Change-Id: Ia6f9f8beb06c43a24605abb24e676eaed68cc67e
Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
jjb/common/include-agl-lava-labs-prepare.sh
jjb/common/include-agl-run-test-prepare.sh
jjb/common/include-agl-run-test-short-release.sh
jjb/common/include-agl-run-test-short.sh

index 938dcbe..56cdaea 100644 (file)
@@ -17,9 +17,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 +28,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]}
index 2c6611d..2045617 100644 (file)
@@ -24,8 +24,25 @@ if [ -e releng-scripts/utils ]; then
     RELENG=$PWD/releng-scripts
 fi
 
+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}
+
 CREATE_ARGS=""
-CREATE_ARGS+="--machine ${MACHINE} "
+CREATE_ARGS+="--machine ${releng_device} "
 
 # If it's a release build
 if [[ $RELEASE_BRANCH ]] && [[ $RELEASE_VERSION ]]; then
index 13a122e..89992f8 100644 (file)
@@ -7,10 +7,8 @@
 
 set -x
 
-echo "## ${MACHINE} ##"
 cd $REPODIR
 
-__MACHINE=${MACHINE%-nogfx} # releng doesn't care
 echo "# LAVA lab target: ${LAVA_LAB} #"
 # releng-scripts depends on jinja2 >= 2.9
 echo "## Check version of python-jinja2: "
@@ -29,7 +27,7 @@ CREATE_ARGS+="--test all"
 $RELENG/utils/create-jobs.py ${CREATE_ARGS} > testjob.yaml
 
 if [ $? != 0 ]; then
-    echo "ERROR: Machine ${$__MACHINE}: LAVA job creation failed."
+    echo "ERROR: Machine ${releng_device}: LAVA job creation failed."
     exit 0
 else
     cat testjob.yaml
index f4fbd5b..955d67d 100644 (file)
@@ -7,10 +7,8 @@
 
 set -x
 
-echo "## ${MACHINE} ##"
 cd $REPODIR
 
-__MACHINE=${MACHINE%-nogfx} # releng doesn't care
 echo "# LAVA lab target: ${LAVA_LAB} #"
 # releng-scripts depends on jinja2 >= 2.9
 echo "## Check version of python-jinja2: "
@@ -29,7 +27,7 @@ CREATE_ARGS+="--test all"
 $RELENG/utils/create-jobs.py ${CREATE_ARGS} > testjob.yaml
 
 if [ $? != 0 ]; then
-    echo "ERROR: Machine ${$__MACHINE}: LAVA job creation failed."
+    echo "ERROR: Machine ${releng_device}: LAVA job creation failed."
     exit 0
 else
     cat testjob.yaml