diff options
author | 2019-09-16 11:35:33 +0000 | |
---|---|---|
committer | 2019-09-16 11:35:33 +0000 | |
commit | 6cbffb1c9663450e091a850e6a091f7ced7ae32e (patch) | |
tree | b8a935a6c73c88eb771fedbbd15843e9baff707d /jjb/common/include-agl-lava-jobs-submit.sh | |
parent | fffd8dbf13e7c878408dd12ad35562eb9a56c791 (diff) | |
parent | 29d66a104a35cbf35fcb39503bed0d46380a4a86 (diff) |
Merge "SPEC-2703: do not fail with set -xe"
Diffstat (limited to 'jjb/common/include-agl-lava-jobs-submit.sh')
-rw-r--r-- | jjb/common/include-agl-lava-jobs-submit.sh | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/jjb/common/include-agl-lava-jobs-submit.sh b/jjb/common/include-agl-lava-jobs-submit.sh index fd261f04..8d8a4f9e 100644 --- a/jjb/common/include-agl-lava-jobs-submit.sh +++ b/jjb/common/include-agl-lava-jobs-submit.sh @@ -68,25 +68,25 @@ echo "####" handle_skiplist() { SKIPLIST=skiplist # detect job type (apps vs non-apps) and get skiplist - echo $JOB_NAME | grep -q 'ci-platform' - if [ $? -eq 0 ];then - git clone https://${GERRIT_HOST}/gerrit/src/qa-testdefinitions.git - if [ $? -ne ];then + if [ ! -z "$(echo $JOB_NAME | grep 'ci-platform')" ];then + git clone https://${GERRIT_HOST}/gerrit/src/qa-testdefinitions.git || true + if [ ! -e qa-testdefinitions ];then echo "ERROR: fail to get qa-testdefinitions" - return 1 + return 0 fi SKIPDIR=qa-testdefinitions/skiplists/ SKIPFILE=common CK_REPO_NAME="qa-testdefinitions" else - git clone https://${GERRIT_HOST}/gerrit/${GERRIT_PROJECT}.git - if [ $? -ne ];then + git clone https://${GERRIT_HOST}/gerrit/${GERRIT_PROJECT}.git || true + # GERRIT_PROJECT could have a / in it + CK_REPO_NAME="$(basename ${GERRIT_PROJECT})" + if [ ! -e $CK_REPO_NAME ];then echo "ERROR: fail to get $GERRIT_PROJECT" - return 1 + return 0 fi - SKIPDIR=${GERRIT_PROJECT}/ + SKIPDIR=${CK_REPO_NAME}/ SKIPFILE=.aglci - CK_REPO_NAME="${GERRIT_PROJECT}" fi for skipfile in $SKIPFILE $MACHINE ${GERRIT_PROJECT} do @@ -111,8 +111,7 @@ handle_skiplist() { do # Check if fail are "normal/accepted" TESTNAME=$(echo $testline | cut -d' ' -f2) - grep -q $TESTNAME $SKIPLIST - if [ $? -ne 0 ];then + if [ -z "$(grep $TESTNAME $SKIPLIST)" ];then echo "DEBUG: $TESNAME not in skiplist" GOODJOB=0 else |