From a448d00f0429fec60d331ce1ac401ecfcc9de3e5 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Wed, 9 Nov 2016 00:35:50 +0100 Subject: copy link destination and fix bash script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I46b30485db01b52af094f51f3becffc4a6408e70 Signed-off-by: Jan-Simon Möller --- jjb/common/include-agl-select.sh | 12 ++++++------ jjb/common/include-agl-test-nbd-short.sh | 7 +++++-- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'jjb') diff --git a/jjb/common/include-agl-select.sh b/jjb/common/include-agl-select.sh index 23e90def..0ba16846 100644 --- a/jjb/common/include-agl-select.sh +++ b/jjb/common/include-agl-select.sh @@ -5,11 +5,11 @@ ## Select what to build / inject the rev from the gerrit env variable ################################################################################ -HANDLED=false +HANDLED="no" # Projects in AGL/* ################### -if test !$HANDLED -a $(echo "$TARGETPROJECT" | grep -q "^AGL/"); then +if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^AGL/"); then MYPROJECT=`echo $TARGETPROJECT | sed -e "s#AGL/##g"` @@ -31,13 +31,13 @@ if test !$HANDLED -a $(echo "$TARGETPROJECT" | grep -q "^AGL/"); then cd .. fi fi - HANDLED=true + HANDLED="yes" fi # Projects in src/* ################### -if test !$HANDLED -a $(echo "$TARGETPROJECT" | grep -q "^src/"); then +if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^src/"); then MYPROJECT=`echo $TARGETPROJECT | sed -e "s#src/##g"` @@ -57,7 +57,7 @@ fi # Projects in staging/* ####################### -if test !$HANDLED -a $(echo "$TARGETPROJECT" | grep -q "^staging/"); then +if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^staging/"); then MYPROJECT=`echo $TARGETPROJECT | sed -e "s#staging/##g"` @@ -75,7 +75,7 @@ exit 0 fi -if !$HANDLED; then +if [[ ! x"yes" = x"$HANDLED" ]] ; then echo "COULD NOT SELECT PROJECT, something is wrong!" echo "$TARGETPROJECT" echo "" diff --git a/jjb/common/include-agl-test-nbd-short.sh b/jjb/common/include-agl-test-nbd-short.sh index cef334b6..aeeb4280 100644 --- a/jjb/common/include-agl-test-nbd-short.sh +++ b/jjb/common/include-agl-test-nbd-short.sh @@ -73,7 +73,7 @@ fi function maketmpfile() { DFILE=`mktemp -u -p ./ | sed -e "s#./##g"` - eval cp \$$1 $DFILE + eval cp -L \$$1 $DFILE export $1="$DFILE" } @@ -114,8 +114,11 @@ timeout: 1800 EOF +cat /opt/AGL/lava-boot/lava-boot | sed -e 's#"~/.lava.yaml"#"/opt/AGL/lava-agl/lava.yaml"#' > ~/lava-boot +chmod a+x ~/lava-boot + logfile=$(mktemp) -/opt/AGL/lava-boot/lava-boot porter.automotivelinux.org -j ./porterboot_nbd.yaml -v ROOTFSTOBOOT="${ROOTFSTOBOOT}" -v KERNELIMAGE=${KERNELIMAGE} -v NETBOOTIMAGE=${NETBOOTIMAGE} 2>&1 | tee $logfile +~/lava-boot porter.automotivelinux.org -j ./porterboot_nbd.yaml -v ROOTFSTOBOOT="${ROOTFSTOBOOT}" -v KERNELIMAGE=${KERNELIMAGE} -v NETBOOTIMAGE=${NETBOOTIMAGE} 2>&1 | tee $logfile popd -- cgit 1.2.3-korg